aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Mixed General Knowledge Quiz
  • what is the output of this Java program?
Multiple choice general knowledge

what is the output of this Java program?

  1. no compilation error;but no output will be displayed

  2. inner=3 outer=1

  3. inner=2 outer=1

  4. compile error

Reveal answer Fill a bubble to check yourself
C Correct answer

Keep practicing — related questions

  • What will be the output of the program? int I = 0; outer: while (true) { I++; inner: for (int j = 0; j < 10...
  • What is the output for the below code ? 1. public class Test { 2. public static void main(String[] args){ 3...
  • What will be the output of the program? int x = 3; int y = 1; if (x = y) /* Line 3 */ { System.out.println(...
  • What will be output from the following statements: System.out.println(1+2+”3”); System.out.println (“1”+2+3);
  • What is the output for the following lines of code? 1: System.out.println(" " +2 + 3); 2: System.out.printl...
  • 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? for (int i = 0; i < 4; i += 2) { System.out.print(i + ); } System.o...
  • What will be the output of the program? int i = O; while(1) { if(i == 4) { break; } ++i; } System.out.print...
Play the full quiz 🎤 Practise this topic out loud

Practice this topic

  • Programming Languages and Compilers (2284 questions)
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy