What will be the output of the following code?
class Test {
int x;
}
public class Main {
public static void main(String[] args) {
Test t = new Test();
System.out.println(t.x);
}
}
0
null
Compilation Error
Runtime Exception
This question is part of this quiz :
Java Classes and Objects