Professional Documents
Culture Documents
Presentation3 - Control Statements
Presentation3 - Control Statements
Presentation3 - Control Statements
if(condition 1) {
statement 1;
}
else if(condition 2) {
statement 2;
}
else if(condition 3) {
statement 3;
}
else {
statement 4;
}
if (i == 10)
System.out.println("i is 10");
else if (i == 15)
System.out.println("i is 15");
else if (i == 20)
System.out.println("i is 20");
else
System.out.println("i is not present");
}
}
}
}
}
}