Can you please tell why is else if
block not executed even if it is true?
int age = 24;
if (age > 22) {
System.out.println("if executed");
} else if (age > 20) {
System.out.println("else if executed");
}
Output:
if executed
Aucun commentaire:
Enregistrer un commentaire