الرجوع
تسجيل الدخول

What will happen when you try to compile and run the code?

class Person {
    private String name = "John Doe";

    private String getName() {
        return name;
    }
}

public class Test {
    public static void main(String[] args) {
        Person p = new Person();
        System.out.println(p.getName());
    }
}