1.

Which of these selection statements test only for equality?(a) if(b) switch(c) if & switch(d) none of the mentionedThis question was addressed to me during an interview for a job.Question is taken from Control Statements in chapter Operators and Control Statements of Java

Answer»

Correct OPTION is (b) SWITCH

The EXPLANATION: Switch statements checks for equality between the controlling VARIABLE and its constant cases.



Discussion

No Comment Found

Related InterviewSolutions