class TestMain {   static int x = 2;   static { x = 4; }   static public void main(String[] args) {   int y = x + 1;   System.out.println(y);  }  }   和命令行:   java TestMain   结果为:()

A .  3 B .  5 C .  编译失败 D .  运行时异常被抛出

时间:2022-10-05 00:25:49 所属题库:Java认证考试综合练习题库

相似题目