If there are multiple selections, you can also use if with a series of else statements.
if (booleanExpression1) {
// statements
} else if (booleanExpression2) {
// statements
}
...
else {
// statements
}
For example:
public class MainClass {
public static void main(String[] args) {
int a = 0;
if (a == 1) {
System.out.println("one");
} else if (a == 2) {
System.out.println("two");
} else if (a == 3) {
System.out.println("three");
} else {
System.out.println("invalid");
}
}
}