The IT Certification Resource Center

Featured Deal

Get CompTIA, Cisco, and Microsoft training courses free for a week.
Learn More ❯

Question 10:

What is the result when you compile and run the following code?

public class Test
{
    public void method()
    {
        for(int i = 0; i < 3; i++)
        {
            System.out.print(i);
        }
        System.out.print(i);
    }
}
A. 0122
B. 0123
C. Compilation error
D. None of these