Java - Encapsulation
What will be the output of the following code?
class Person {
private String name = "Alice";
public String getName() { return name; }
}
public class Test {
public static void main(String[] args) {
Person p = new Person();
System.out.println(p.name);
}
}