Important Java Mcq 1

Which of these selection statements test only for equality?

a) if

b) switch

c) if & switch

d) none of the mentioned

Answer:

b) switch

Explanation:

The switch statement allows a variable to be tested for equality against a list of values. Thus, option B is correct!

Related MCQs
Aniket Malik

Aniket Malik

CERTIFIED TUTOR/TRAINER WITH 300+ REVIEWS

Facing difficulty with

this concept?