本帖最后由 郑冬 于 2012-6-19 13:08 编辑
下面的程序,为什么不能通过编译?
class Base
{
public String classname= "Base";
}
class Derived extends Base
{
private String className = "Derived";
}
public class PrivateMatter
{
public static void main(String [] args)
{
System.out.println(new Derived().className);
}
} |
|