Questions


October 2021 0 59 Report
⇒ Rewrite the following if statement using switch statement :- if(choice==1)
System.out.println(“Blue”);
else if(choice==2||choice==3)
System.out.println(“Green”);
else if(choice==4)
System.out.println(“Red”);
else
System.out.println(“Invalid choice”);

Add an Answer


Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Helpful Social

Copyright © 2024 EHUB.TIPS team's - All rights reserved.