Aliensbrain
  • Home
  • Topics
  • Quizzes
  • Notebooks
  • Community
  • Sign in
  • programming languages Online Quiz - 340
  • Consider the following piece of code: 1 long i = 2 ; ...

Consider the following piece of code: 1 long i = 2 ; 2 switch (i) { 3 case 1: 4 System.out.println ("Case 1"); 5 case 2: 6 System.out.println ("Case 2"); 7 case 3: 8 System.out.println ("Case 3"); 9 default: 10 System.out.println ("Default"); 11 } Which of the following lines will be included in the output? (Choose all that apply, please bear with code as formating it sems is not possible,first numbers represent line numbers)

technology programming languages
  1. Case 1

  2. Case 2

  3. Case 3

  4. Default

  5. Compiler Error


Show answer
Correct Option: E

Find more quizzes:

© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy