Which of the following is correct about switch expression in Java?

switch statement is more efficient than a set of nested ifs . two case constants in the same switch can have identical values. switch statement can only test for equality, whereas if statement can evaluate any type of boolean expression. it is possible to create a nested switch statements.

Sizin İçin Seçtik  How do you write a switch case in Java 8?

Leave a Reply

Your email address will not be published. Required fields are marked *