Skip to content
Quiz · Variables and types · lesson 2 of 8

Quiz — a variable with no value

What happens when this program is compiled and run?

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