What will be the output of the following Java program?

Last Updated :
Discuss
Comments

What will be the output of the following Java program?

Java
public class Main {
    static int x;
    public static void main(String[] args) {
        System.out.println(x);
    }
}


0

Compilation Error


Runtime Error


Undefined Behavior

Share your thoughts in the comments