Skip to main content
Output PredictionJV Java Easy+10 XP

Default int Value

What is the default value of an int field in a class?

Java
class Example {
    int x;
}
Example e = new Example();
System.out.println(e.x);

🔮 What is the output?