Java: Switch statement

Last updated on:

public class Switch {
public static void main(String[] args) {

char awsemnoestLevel = 'C';

switch (penaltyKick) {

case 'A': System.out.println("Test automation!");
break;
case 'B': System.out.println("Unit testing!");
break;
case 'C': System.out.println("Manual testing!");
break;
default:
System.out.println("No testing at all");

}

}
}

View Comments

Leave a Comment

Use markdown or basic HTML and be nice.