Menu
Question Index
...

Which of the following two types are acceptable as expressions for the switch statement? The expression in the below example is expr.

switch (expr)
{
    default:  
        System.out.println("Hello");
}
1. byte 2. long 3. char 4. float 5. double 6. boolean


1 and 3
2 and 4
3 and 5
4 and 6

Doubts

Problems

Topic: switch Statement In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App