单选题:For the code below:
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
```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