Multiple choice

What is the output of the given code?

public class HelloWorld {
 public static void main(String[] args) {
  int i = 128 << 2 << 1 << 0;
  switch (i) {
   default: System.out.println("Bye");
   case 128 << 4 << 3 << 2 >> 6:
     System.out.println("Hello Italy");
   case 128 << 4 << 2 << 2 >> 6:
     System.out.println("Hello Paris");
   case 128 << 4 << 4 << 2 >> 3:
     System.out.println("Hello London");
  }
 }
}

  1. ByeHello ItalyHello ParisHello London

  2. Hello ItalyHello ParisHello London

  3. Hello ParisHello London

  4. Hello London

  5. Compiler error

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

This is the correct answer.