package p1;
public class a
{
   protected int i=0;
}


package p2;
import p1.a;
public class b extends a
{
    public static void main(String arge[])
   {
        a aa=new a();
        System.out.println(aa.i);   <==  compiler error
   }
}

------------------------------------------------------------------------
文章来源:http://loulanJS.tianyablog.com/blogger/post_show.asp?BlogID=269743&PostID=4433274&idWriter=0&Key=0