Question: A) What output is produced by the following code? B) What output is produced if the first line were int key = -1; int key
A) What output is produced by the following code? B) What output is produced if the first line were int key = -1; int key = 1; switch (key + 2) { case 1: System.out.println("Study English"); break; case 2: System.out.println("Study Math"); break; case 3: System.out.println("Study Physics"); break; case 4: System.out.println("Study Programming"); break; default: System.out.println("Watch TV"); break
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
