A

Admin • 830.13K Points
Coach

Q. How can you create an infinite loop using for?

  • (A) for(;;)
  • (B) for(1;;)
  • (C) for(;;1)
  • (D) for(int i=0;;i++)
  • Correct Answer - Option(A)
  • Views: 14
  • Filed under category Java
  • Hashtags: Java Loops

Explanation by: Admin
for(;;) creates an infinite loop as all parts are omitted.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.