Java - Packages and Access Control
What will be the output of the following Java code?
class Test {
private int number = 5;
public void printNumber() {
System.out.println(number);
}
}
public class Main {
public static void main(String[] args) {
Test t = new Test();
t.printNumber();
}
}