public class Souter {
int a = 99;
static int b =1;
public static class Sinner{
int b = 2;
public void show(){
System.out.println("静态外部类调用"+Souter.b);
System.out.println("静态内部类调用"+b);
}
}
public static void main(String[] args) {
Sinner.si=new Sinner();
si.show();
}
}
测试错误提示:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
si cannot be resolved or is not a field
si cannot be resolved
问为什么?