What will be the result of the following program compilation and execution?

public class Test {
    private static class Test2 {
        private static final String name = "Name";
    }
    
    public static void main(String[] args) {
        System.out.println(Test2.name);
    }
}

Follow CodeGalaxy

Mobile Beta

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