Java - Packages and Access Control
Find the problem in this code snippet:
package pkg1;
public class Parent {
protected void show() {
System.out.println("Parent show");
}
}
package pkg2;
import pkg1.Parent;
public class Child {
public static void main(String[] args) {
Parent p = new Parent();
p.show();
}
}