+ 2

Nested If Statements

in below what value for age gives me the output Too Young: public class Program { public static void main(String[] args) { int age = 25; if(age > 0) { if(age > 16) { System.out.println("Welcome!"); } else { System.out.println("Too Young"); } } else { System.out.println("Error"); } } }

11th Nov 2017, 12:07 PM
Rajesh Kumar
Rajesh Kumar - avatar
1 Réponse
+ 13
1-16
11th Nov 2017, 12:28 PM
Shamima Yasmin
Shamima Yasmin - avatar