大家看看 这题的答案是?
4、类Test1、Test2定义如下:
1.public class Test1 {
2. public float aMethod(float a,float b)throws IOException {
3. }
4. }
5. public class Test2 extends Test1{
6.
7. }
将以下哪种方法插入行6是不合法的。(BCD)考继承和异常之间的知识
A. float aMethod(float a,float b){ } //不是方法重写 默认修饰符 缩小范围啦
B. public int aMethod(int a,int b)throws Exception{ }
C. public float aMethod(float p,float q){ }
D. public int aMethod(int a,int b)throws IOException{ }
尽量说详细点 谢谢大家啦!!