CodeGym/Java Tasks/We solemnly publish and declare these variables...

We solemnly publish and declare these variables...

  • 1
  • Locked
In Java, variables must be declared, i.e. we must allocate space for a specific variable type. Only after we have done this can we assign a specific value. It's nice that we can do this literally in one line. In this task, you have to declare several variables and immediately assign them values.
You can't complete this task, because you're not signed in.
Comments (84)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Anonymous #11481753
Level 1 , United States
7 March 2024, 16:13
public class Sample{ public static void String [] args) { String s = "abc"; int a = 10; } }
Anonymous #11468646
Level 1 , India
11 February 2024, 16:41
public Task1{ public static void main(String[] args){ int a=10; System.out.println(a); } }
Don Ricket
Level 2 , Serbia
15 January 2024, 11:18
public class Solution { public static void main(String[] args) { int a = 4; int b = 7; } }
vidya somachandra
Level 3 , Netherlands
9 January 2024, 03:43
public class Variables { public static void main (String args[]) { int a =5; int b =8; } }
17 December 2023, 09:19
public class Variables{ public static void main (String args[]) { int a = 9; float f = 96.36f; } }
Aiden Hurtubise
Level 1 , United States
21 September 2023, 12:23
press help
Anonymous #11384356
Level 2 , United Kingdom, United Kingdom
20 August 2023, 10:48
Same issue, I can't unlock the next task :(
Anonymous #11374770
Level 1 , India
31 July 2023, 06:24
how we unlock
sreeju
Level 2 , Bengaluru, India
21 May 2023, 04:02
public class Main{
      public static void main(String args[]){
                int a = 1, b = 2;
      }
}
L01954
Level 1 , Netherlands
15 March 2023, 11:13
int a = 10; int b = 5;