package test;
public class test { private String baseName = "base";
public test() { callName(); }
public void callName() { System.out.println(baseName); }
static class Sub extends test { private String baseName = "sub";
public void callName() { System.out.println(baseName); }
}
public static void main(String[] args) { test bb = new Sub(); }}
为什么输出结果为 null?
添加回答
举报
0/150
提交
取消