武汉博创华宇吧 关注:12贴子:255
  • 0回复贴,共1

求教,为什么非静态内部类里不能定义静态变量

只看楼主收藏回复

class Outer {
class Inner {
static int i = 0;
}
}
The field i cannot be declared static; static fields can only be declared in static or top level types


1楼2016-05-03 14:32回复