package bisic;
/*
* 继承当中的访问权限
*/
public class PublicPrivate01 {
}
class Parent{
private int i = 0;
int j = 0;
protected int k = 0;
public int m = 0;
private void m1(){
i = 100;
}
}
class Child extends Parent{
public void m2() {
Child c = new Child();
//System.out.println(c.i);//这句访问不到i,你是继承下来了,不过无法访问(有私有变量和方法的所有权 无使用权)
//c.m1();
System.out.println(c.j);
System.out.println(c.k);
System.out.println(c.m);
}
}