Question: this is for java e Q9 of 14 Choose the correct option based on the code snippet given below. public class Demo { public static
e Q9 of 14 Choose the correct option based on the code snippet given below. public class Demo { public static void main(String[] args) { float f - 12; switch (f) { // Line 1 case 10 + 1: // Line 2 System.out.println("Twelve"); case @: // Line 3 System.out.println("Zero"); case (int) 12.0: System.out.println("Decimal"); default: System.out.println("Default"); s } ) O Compiles successfully without any error O Compilation error in Line 3 Cannot use o in case" Compilation error in Line 2 "Cannot use operator in case w
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
