Java Programming Tutorial - Nested if Statements


class apples{

public static void main (String[] args) {

int age = 60;
if(age < 50) {
System.out.println("You are young");}
else {
System.out.println("You are old");
if (age > 75) {
System.out.println("You are really old");
}else {
System.out.println("don't worry You aren't really that old");
}
}

}

}


Comments