Which two are acceptable types for y in the following switch statement?

switch(y) {
    default:
        System.out.println("Goodbye");
}

1. byte
2. double
3. String
4. int
5. char
Choose the correct answer from the options given below:

1
1 and 3
2
2, 3 and 4
3
1, 2, 3 and 5
4
1, 3, 4 and 5
5
Question Not Attempted

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation