有以下代码:public class Test { String s; static class Inner { void testMethod() { s = "Hel
有以下代码:public class Test { String s; static class Inner { void testMethod() { s = "Hello world."; } } public static void main(String[] argv) { Inner i = new Inner(); i.testMethod(); System.out.println(s); } } 以下哪句是正确的?
A、编译通过,打印出Hello world.
B、无法编译,因为Test类里的String s不是static的
C、无法编译,因为Inner不能像这样在main中使用
D、编译通过,但是运行时刻出错,因为s没有被初始化