Skip to content

Commit bb68ef0

Browse files
committed
finished VariableTypes exercise and solution
1 parent 2a48437 commit bb68ef0

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package com.codefortomorrow.beginner.chapter1.practice;
2+
3+
/**
4+
* @author ArmeetJatyani
5+
* March 2021
6+
*
7+
* Define different types of variables
8+
*/
9+
10+
public class VariableTypes {
11+
public static void main(String[] args) {
12+
// write your code here
13+
14+
// define an integer variable on line 15
15+
16+
17+
// define a float variable on line 18
18+
19+
20+
// define a double variable on line 21
21+
22+
23+
// define a boolean variable on line 24 (Hint: true/false) on line 24
24+
25+
26+
// define a character variable on line 27
27+
28+
29+
// define a string variable on line 30
30+
31+
32+
}
33+
}
34+
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package com.codefortomorrow.beginner.chapter1.practice;
2+
3+
/**
4+
* @author ArmeetJatyani
5+
* March 2021
6+
*
7+
* Define different types of variables
8+
*/
9+
10+
public class VariableTypes {
11+
public static void main(String[] args) {
12+
// write your code here
13+
14+
// define an integer variable on line 15
15+
int age = 23;
16+
17+
// define a float variable on line 18
18+
float pi = 3.14f;
19+
20+
// define a double variable on line 21
21+
double decimal = 23.2352536d;
22+
23+
// define a boolean variable on line 24 (Hint: true/false) on line 24
24+
double dogsOut = true; // the dogs are out :)
25+
26+
// define a character variable on line 27
27+
char letter = 'A';
28+
29+
// define a string variable on line 30
30+
char name = "Jeff";
31+
32+
}
33+
}
34+

0 commit comments

Comments
 (0)