Java OCA OCP Practice Question 995

Question

What is wrong with the following statement?

while (x >> 2) do {  
       x *= y;  
}  
  • A. The loop expression is not a boolean expression.
  • B. The do should be removed.
  • C. The while should be capitalized.
  • D. There is nothing wrong with this statement.


A and B.

Note

The loop condition must be a boolean expression.

There is no do in a while statement.




PreviousNext

Related