Skip to content

Commit b2ff0d1

Browse files
committed
Completion of Variables.java
1 parent 9f8e866 commit b2ff0d1

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

src/main/java/com/amigoscode/_1_beginners/_1_thebasics/Variables.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,33 @@ public class Variables {
1111
public static void main(String[] args) {
1212

1313
// TODO: 1 - Declare an int variable called age and assign it the value 25
14-
14+
int age = 25;
1515

1616
// TODO: 2 - Declare a double variable called price and assign it the value 9.99
17-
17+
double price = 9.99;
1818

1919
// TODO: 3 - Declare a boolean variable called isJavaFun and assign it the value true
20-
20+
boolean isJavaFun = true;
2121

2222
// TODO: 4 - Declare a String variable called name and assign it your name
23-
23+
String name = "Jose";
2424

2525
// TODO: 5 - Declare a char variable called grade and assign it the value 'A'
26-
26+
char grade = 'A';
2727

2828
// TODO: 6 - Print all the variables above using System.out.println
2929
// Hint: You can print each variable on its own line, e.g.:
3030
// System.out.println("Age: " + age);
31-
31+
System.out.println("Age: " + age);
32+
System.out.println("Price: " + price);
33+
System.out.println("isJavaFun: " + isJavaFun);
34+
System.out.println("Name: " + name);
35+
System.out.println("Grade: " + grade);
3236

3337
// TODO: 7 - Declare a final (constant) variable called MAX_SCORE, set it to 100, and print it
3438
// Hint: Use the 'final' keyword before the type to make a constant
39+
final int MAX_SCORE = 100;
40+
System.out.println("MAX_SCORE: " + MAX_SCORE);
3541

3642
}
3743
}

0 commit comments

Comments
 (0)