20170306问题解析请点击今日问题下方的“【Java每日一题】20170307”查看(问题解析在公众号首发,公众号ID:weknow619)
package Mar2017; public class Ques0307 {
private String s1 = "Ques0307 string"; class InnerClass {
private String s2 = "inner string"; public void innerMethod() {
System.out.println(s1);
System.out.println(s2);
}
} public static void outerMethod() {
Ques0307.InnerClass inner = new Ques0307().new InnerClass();
inner.innerMethod();
} public static void main(String[] args) {
outerMethod();
}
}
今日问题:
请问主程序能否正常运行输出结果?(点击以下“【Java每日一题】20170307”查看20170306问题解析)
题目原发布于公众号、简书:【Java每日一题】20170307,【Java每日一题】20170307 (也可以扫描头像二维码查看)