Single Choice
Not Set
QWhat will be the result of the following code?
public class Test{
static public void main(String args[]){ //line 2
int i, j;
for(i=0; i<3; i++){
for(j=1; j<4; j++){
i%=j;
System.out.println(j);
}
}
}
}
ID: #2147
Java Control Flow
1,904 views
Question Info
#2147Q ID
Not SetDifficulty
Java Control FlowTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
Repeatedly print 1 2 3 and cause infinite loop.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic