A

Admin • 833K Points
Coach

Q. What is the output of the below Java code?

Code:
int score=1;
for(; true; score++)
{
System.out.print(score +",");
if(score > 3)
break;
}
  • (A) 1,2,3,
  • (B) 1,2,3
  • (C) 1,2,3,4,
  • (D) 1,2,3,4
  • Correct Answer - Option(C)
  • Views: 30
  • Filed under category Java
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.