Flow Control - Study Mode

[#21] Which of the following statements are incorrect?
Correct Answer

(C) private members of class can be inherited by a subclass, and become protected members in subclass

[#22] What is the purpose of the "if" statement in Java?
Correct Answer

(A) To execute a block of code conditionally

[#23] Which of the following is not a valid comparison operator in Java?
Correct Answer

(D) ><

[#24] In Java, which statement is used to exit a loop prematurely?
Correct Answer

(B) break

[#25] What is the purpose of the "switch" statement in Java?
Correct Answer

(C) To perform different actions based on the value of an expression