Question: Write the output of the following Java program and explain the results. (10pts) public class Test public static void main (String args (]) int index-3;
Write the output of the following Java program and explain the results. (10pts) public class Test public static void main (String args (]) int index-3; switch (index) case 1: System.out.println("equal to 1"): break case 2: System.out.println("equal to 2"): break case 3: System.out.println("equal to 3") case 4: System.out.println ("equal to 4") default: System.out.println ("others")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
