What is the following program output:

class Main {
    public static void main(String[] args) {
        switch (new Integer(4)) {
            case 4:
                System.out.println("4");
                break;
            default:
                System.out.println("default");
        }
    }
}

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback