What will be the result of the compilation and execution of the following code:

interface I {
    public final static int EASY = 5;
}

public class Main implements I {    
    public static void main(String[] args) {
        int a = 5;
        test(++a);
    }
    
    static void test(int a) {
        a += EASY + a++; 
        System.out.println(a);
    }
}

Follow CodeGalaxy

Mobile Beta

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