File tree Expand file tree Collapse file tree 2 files changed +56
-0
lines changed
src/com/codefortomorrow/beginner/chapter2 Expand file tree Collapse file tree 2 files changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ package com .codefortomorrow .beginner .chapter2 .practice ;
2
+
3
+ /**
4
+ * @author ArmeetJatyani
5
+ * March 2021
6
+ *
7
+ * Print out the number of apples and oranges!
8
+ */
9
+
10
+ public class ApplesOranges {
11
+ public static void main (String [] args ) {
12
+ // write your code here
13
+
14
+ // define an integer variable called numOranges with value 10 (line 15)
15
+
16
+
17
+ // define an integer variable called numApples with value 24 (line 18)
18
+
19
+
20
+ // print out number of oranges, output: "I have 10 oranges." (line 21)
21
+
22
+
23
+ // print out number of apples, output: "I have 24 apples." (line 24)
24
+
25
+
26
+ }
27
+ }
28
+
Original file line number Diff line number Diff line change
1
+ package com .codefortomorrow .beginner .chapter2 .practice ;
2
+
3
+ /**
4
+ * @author ArmeetJatyani
5
+ * March 2021
6
+ *
7
+ * Print out the number of apples and oranges!
8
+ */
9
+
10
+ public class ApplesOranges {
11
+ public static void main (String [] args ) {
12
+ // write your code here
13
+
14
+ // define an integer variable called numOranges with value 10 (line 15)
15
+ int numOranges = 10 ;
16
+
17
+ // define an integer variable called numApples with value 24 (line 18)
18
+ int numApples = 24 ;
19
+
20
+ // print out number of oranges, output: "I have 10 oranges." (line 21)
21
+ System .out .println ("I have " + numOranges + " oranges." );
22
+
23
+ // print out number of apples, output: "I have 24 apples." (line 24)
24
+ System .out .println ("I have " + numApples + " apples." );
25
+
26
+ }
27
+ }
28
+
You can’t perform that action at this time.
0 commit comments