Explanatory Question
Rewrite the following code using switch case statement
if (value == 1) {
System.out.println("1st division");
} else if (value == 2) {
System.out.println("2nd division");
} else if (value == 3) {
System.out.println("3rd division");
} else {
System.out.println("Wrong choice");
}
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.