A

Admin • 828.03K Points
Coach

Q. What is the output?
int i = 10;
while(i < 10) {
System.out.println(i);
i++;
}

  • (A) 10
  • (B) Nothing
  • (C) 10 11
  • (D) Infinite loop
  • Correct Answer - Option(B)
  • Views: 10
  • Filed under category Java
  • Hashtags: Java Loops

Explanation by: Admin
The condition is false on the first check, so loop doesn’t run.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.