What is the output produced by the following code? int key = 1; switch (key + 1) { case 1: System.out.println("Apples"); break; case 2: System.out.println("Oranges"); break; case 3: ...



What is the output produced by the following code?


int key = 1;


switch (key + 1)


{



case 1:



System.out.println("Apples");



break;



case 2:



System.out.println("Oranges");



break;



case 3:



System.out.println("Peaches");



case 4:



System.out.println("Plums");



break;



default:



System.out.println("Fruitless");


}



May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here