i is an int of value 2 and the result variable is declared. What does the following code print out?switch(i) {case 1: result = 1;break;case 2: result = 2;case 3: result = 3;case 4: result = 4;}system.out.printIn(

🎲 Try a Random Question  |  Total Questions in Quiz: 16  |  🧠 Study this quiz with Flashcards
This question is part of a full practice quiz:
Java Quiz — practice the complete quiz, review flashcards, or try a random question.

For Pluralsight Skill Assessments.


i is an int of value 2 and the result variable is declared. What does the following code print out?<br>switch(i) {<br>case 1: result = 1;<br>break;<br>case 2: result = 2;<br>case 3: result = 3;<br>case 4: result = 4;<br>}<br>system.out.printIn(