A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

© 繁华落幕 中级黑马   /  2015-6-21 21:47  /  213 人查看  /  0 人回复  /   0 人收藏 转载请遵从CC协议 禁止商业使用本文

给出以下代码,请问该程序的运行结果是什么?如有问题,请说明原因。
class Outer {
final String s = "我是外部类变量";
public void method () {
String s1 = "我是内部类变量";
class Inner {
public void innerMethod() {
int x = 20;
System.out.println(s);
System.out.println(x);
System.out.println(s1);
}
}
}
}

0 个回复

您需要登录后才可以回帖 登录 | 加入黑马