编译 运行下面代码将发生() public class Test{ public static void test(){ this.print(); } pu
已帮助 人
编译、运行下面代码将发生() public class Test{ public static void test(){ this.print(); } public static void print(){ System.out.println("Test"); } public static void main(String args[]){ test(); } }
A.运行时输出:Test
B.运行时不输出任何内容
C.运行时抛出例外,指出一个对象还没有被创建
D.编译出错,指出变量this不能用于静态上下文中

回答
共1条回复-
D
