Question: What is wrong with the code below : Scanner scanner = new Scanner(System.in); int option = scanner.nextInt(); switch (option) { case 1: System.out.println(1 -> New);

What is wrong with the code below :

Scanner scanner = new Scanner(System.in); int option = scanner.nextInt(); switch (option) { case 1: System.out.println("1 -> New"); break; case 2: System.out.println("2 -> Edit"); break; case 3: System.out.println("3 -> Delete"); break; case 4: System.out.println("4 -> View"); break; case 5: System.out.println("5 -> Quit"); default: System.out.println("Unknown command"); }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!