Home / Programming MCQs / JAVA MCQs / Question

R

Ram Sharma • 188.81K 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

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.