R

Ram Sharma • 193.88K Points
Coach

Q. What is the output of the below java program that implements nesting of loops?

Code:
int i=1, j=1;
while(i<3)
{
do
{
System.out.print(j + ",");
j++;
}while(j<4);
i++;
}
  • (A) 1,2,3,4,1,2,3,4,
  • (B) 1,2,3,4,
  • (C) 1,2,3,1,2,3,
  • (D) 1,2,3,
  • Correct Answer - Option(B)
  • Views: 197
  • Filed under category JAVA

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.


Question analytics