A

Admin • 828.43K Points
Coach

Q. What will be the output?
for(int i=1;i<=5;i++){
if(i==3) continue;
System.out.print(i);
}

  • (A) 12345
  • (B) 1245
  • (C) 1234
  • (D) 135
  • Correct Answer - Option(B)
  • Views: 13
  • Filed under category Java
  • Hashtags: Java Loops

Explanation by: Admin
When i==3, continue skips printing 3.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.