1.

Please tell me the answer as soon as possible​

Answer»

public class MyClass { public static void main(String args[]) { int var = 1; switch(var) { case 1: System.out.println("One"); BREAK; case 2: System.out.println("Two"); break; DEFAULT: System.out.println("Any other NUMBER"); } }}Explanation:CHANGE the value of var and the OUTPUT will change according to the cases.



Discussion

No Comment Found