File tree Expand file tree Collapse file tree 2 files changed +68
-0
lines changed
src/com/codefortomorrow/beginner/chapter2 Expand file tree Collapse file tree 2 files changed +68
-0
lines changed Original file line number Diff line number Diff line change
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
+
Original file line number Diff line number Diff line change
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
+
You can’t perform that action at this time.
0 commit comments