aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Java Practice Test - 5
  • What will be the output of the program? int I = 0; label:...
Multiple choice

What will be the output of the program? int I = 0; label: if (I < 2) { System.out.print("I is " + I); I++; continue label; }

  1. I is 0

  2. I is 0 I is 1

  3. Compilation error

  4. None of the above

Reveal answer Fill a bubble to check yourself
C Correct answer

Keep practicing — related questions

  • What will be the output of the program? for (int i = 0; i < 4; i += 2) { System.out.print(i + ); } System.o...
  • What will be the output of the program? public class Test { public static void main(String [] args) { int I...
  • What will be the output of the program? int i = O; while(1) { if(i == 4) { break; } ++i; } System.out.print...
  • What will be the output of the program? int x = 3; int y = 1; if (x = y) /* Line 3 */ { System.out.println(...
  • class Demo { public static void main(String[] args) { int x = 9; int y = 6; for(int z = 0; z < 6; z++, y--)...
  • What will be the output of the program? int i = 0, j = 5; tp: for (;;) { i++; for (;;) { if(i > --j) { brea...
  • What will be the output of the program? int i = 0, j = 5; tp: for (;;) { i++; for (;;) { if(i > --j) { brea...
  • What will be the output of the program? int I = 0; outer: while (true) { I++; inner: for (int j = 0; j < 10...
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy