What is the result of the following program execution?

public class Main {
    public static void main(String[] args) {
        final Integer i = 1;
        switch (1) {
            case i:
                System.out.println("1");
                break;
            default:
                System.out.println("default");
        }
    }
}
Explanation
switch can only work with primitives, enum values and (since Java 7) strings

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback