Skip to content

Commit ab6a177

Browse files
committed
added conditionals_And_Loops\Nested_If_Statements.java
1 parent 45cc2df commit ab6a177

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package conditionals_And_Loops;
2+
3+
public class Nested_If_Statements {
4+
5+
public static void main(String[] args) {
6+
7+
int age = 60;
8+
9+
if (age < 50) {
10+
System.out.println("Youre young");
11+
} else {
12+
System.out.println("youre OLD");
13+
if (age > 75) { // this if else statement is inside another if else statement
14+
System.out.println("youre old but");
15+
} else {
16+
System.out.println("youre not that old");
17+
}
18+
}
19+
20+
21+
22+
23+
24+
}
25+
26+
}

0 commit comments

Comments
 (0)