import java.io.EOFException;
import java.io.IOException;
public class ATestClass2 {
public int x(int a) throws IOException{return 0;}
}
class Class3 extends ATestClass2{
//code
}
多选,在//code处填上以下哪个答案可以通过编译。
A public int x(int a) throws Exception{return 0;}
B public float x(int a) throws IOException{return (float)0.0;}
C public float x(float a) throws IOException{return (float)0.0;}
D public int x(int a) {return 0;}
E public int x(int a) throws EOFException{return 0;}
这道题目,一看就知道是在考overload,但是我没选对。拿出来分享一下。