Quiz on Repetition with Loops
Test your knowledge of repetition with loops.
1
What is the result when the following program is executed?
class Test
{
public static void main( String args[])
{
for (int i = 0; i < 3; i ++)
{
System.out.print(i + " ");
}
}
}
A)
1 2 3
B)
0 1 2
C)
3 2 1
D)
3
Question 1 of 60 attempted
Get hands-on with 1200+ tech skills courses.