Aliensbrain
  • Home
  • Topics
  • Quizzes
  • Notebooks
  • Community
  • Sign in
  • programming languages Online Quiz - 113
  • class Demo { public static void main(String[] args) { ...

class Demo { public static void main(String[] args) { String s = "-"; switch(TimeZone.CST) { case EST: s += "e"; case CST: s += "c"; case MST: s += "m"; default: s += "X"; case PST: s += "p"; } System.out.println(s); } } enum TimeZone {EST, CST, MST, PST } What is the result?

technology programming languages
  1. -c

  2. -X

  3. -cm

  4. -cmp

  5. -cmXp

  6. Compilation fails.


Show answer
Correct Option: E

Find more quizzes:

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