下列代码的执行结果是 public class Test { public int aMethod() { stat

分类: 2019江中知识赛B(看题模式) 发布时间: 2023-12-01 12:13 浏览量: 1

下列代码的执行结果是 public class Test { public int aMethod() { static int i=0; i++; System.out.println(i); } public static void main(String args[]) { Test test = new Test(); test.aMethod(); } }

A.编译错误

C.1

D.运行成功,但不输出

E.A

F.3

正确答案是A