R
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++;
}
while(i<3)
{
do
{
System.out.print(j + ",");
j++;
}while(j<4);
i++;
}
- Correct Answer - Option(B)
- Views: 197
- Filed under category JAVA
Discusssion
Login to discuss.