What will be the output of the following code?

Last Updated :
Discuss
Comments

What will be the output of the following code?

Java
interface X {
    int VALUE = 10;
}
class Y implements X {
    public static void main(String[] args) {
        System.out.println(VALUE);
    }
}


10

Compilation Error

Runtime Error

NullPointerException


Share your thoughts in the comments