AllInfoHub Logo

AllInfoHub – MCQ Practice

Introduction to Java – Multiple Choice Questions (MCQs)

  1. 49. What is the output of the following code? `for (int i = 0; i < 3; i++) System.out.print(i + \ \");`?"""

    • A. 2000 1 2
    • B. 1 2 2003
    • C. 0 1
    • D. 1 2
  2. 50. What is the output of the following code? `int z = 0; while (z < 3) { System.out.print(z + \ \"); z++; }`?"""

    • A. 2000 1 2
    • B. 1 2 2003
    • C. 0 1
    • D. 1 2