class Ques0357{ public static void main(String[] argv){ int s = 2; switch (s) { case 1: System.out.println(“Fred”); break; case 2:…
September 2nd, 2009
The Switch statement
1 Comment, Java Facts, by Daisy Williams.The switch statement is a multiway branch statement. The general form of the switch statement is given below: switch(expression) {…