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

单选题:Given the file FirstClass.java:

Luz5年前 (2021-05-10)题库1080
Given the file FirstClass.java:
```Java
import java.*;
public class FirstClass {}
public interface Second {}
abstract class SecondClass {}
```
What error will the compiler likely generate? @[C](2)

A. Package java not found in import
B. Public class FirstClass must be defined in a file called “FirstClass.class”
C. Public interface Second must be defined in a file called “Second.class”
D. None. The file will compile fine.





A.Package java not found in import
B.Public class FirstClass must be defined in a file called “FirstClass.class”
C.Public interface Second must be defined in a file called “Second.class”
D.None. The file will compile fine.


答案:C