Java switch Statement
switch (expression) { case constant: // switch block 1… break; case constant: // switch block 2… break; default: // default switch block … ; } class Test { public static void main(String[] args) { String color = “blue”; switch (color) { case “white”: // if it is white, execute this block of code System.out.println(“The color…
Read More Java switch Statement