-->
当前位置:首页 > 题库

单选题:For the code below:

Luz5年前 (2021-05-10)题库1088
For the code below:
```Java
public class MyProgram {
public void main() {
try {
System.out.println("Hello");
}
}
}
```
Which statement is right? ( ) @[C](2)

A. Code compiles
B. Code does NOT compile for the error in the 2nd line
C. Code does NOT compile for the error in the 5th line
D. Code does NOT compile because it does not declare any exception



A.Code compiles
B.Code does NOT compile for the error in the 2nd line
C.Code does NOT compile for the error in the 5th line
D.Code does NOT compile because it does not declare any exception


答案:C