What will be printed into console after executing next piece of code:

public class Test {
    public void checkCase(int i) {
        switch (i&01) {
            case 1:
                System.out.println("Case 1");
            case 2:
                System.out.println("Case 2");
            default:
                System.out.println("Default");
            case 3:
                System.out.println("Case 3");
        }
    }
    public static void main(String[] args) {
        Test test = new Test();
        test.checkCase(-1);
    }
} 

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Java quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes