早教吧作业答案频道 -->其他-->
给我解释一下下面的java题吧16.类Parent、Child定义如下:1.publicclassParent2.{publicfloataFun(floata,floatb)throws3.IOException{}4.}5.publicclassChildextendsParent{6.7.}将以下哪种
题目详情
给我解释一下下面的java题吧
16.类Parent、Child定义如下:
1. public class Parent
2.{ public float aFun(float a, float b) throws
3. IOException { }
4.}
5.public class Child extends Parent{
6.
7.}
将以下哪种方法插入行6是不合法的。( )
A、float aFun(float a, float b){ }
B、public int aFun(int a, int b)throws Exception{ }
C、public float aFun(float p, float q){ }
D、public int aFun(int a, int b)throws IOException{ }
16.类Parent、Child定义如下:
1. public class Parent
2.{ public float aFun(float a, float b) throws
3. IOException { }
4.}
5.public class Child extends Parent{
6.
7.}
将以下哪种方法插入行6是不合法的。( )
A、float aFun(float a, float b){ }
B、public int aFun(int a, int b)throws Exception{ }
C、public float aFun(float p, float q){ }
D、public int aFun(int a, int b)throws IOException{ }
▼优质解答
答案和解析
方法覆盖的时候 抛出的异常必须和父类抛出的异常一致
所以选A
所以选A
看了 给我解释一下下面的java题...的网友还看了以下:
(40)为了提高查询速度,对SC表(关系)创建唯一索引,应该创建在( )属性上。A)(S#,C#)B 2020-05-23 …
为了提高特定查询的速度,对SC关系创建唯一索引,应该创建在( )属性上。A)( S#,C#) B)( 2020-05-23 …
(37)为了提高查询速度,对关系 SC 创建唯一索引,应该创建在( )属性上。 A)(S#,C#) 2020-05-23 …
为了提高查询速度,对SC表(关系)创建唯一索引,应该创建在哪个(组)属性上( )。 A.(S#,C# 2020-05-23 …
为了提高查询速度,对SC表(关系)创建唯一索引,应该创建在()属性上。A.(S#,C#)B.S#C. 2020-05-23 …
为了提高查询速度,对SC表(关系)创建惟一索引,应该创建在哪个(组)属性上?()A.S#,C#B.S 2020-05-23 …
为了提高查询速度,对SC表(关系)创建唯一索引,应该创建在哪个(组)属性上?A.(S#,C#)B.S 2020-05-24 …
为了提高特定查询的速度,对SC关系创建唯一索引,应该创建在( )属性上。A)(S#,C#)B)(S# 2020-05-24 …
______ A.(S,C)B.(T,R)C.(T,P)D.(T,S)A.B.C.D. 2020-05-26 …
有A,S,C三堆苹果,A,C的苹果之和是B的2倍,如果把C堆去掉6个苹果,那么A堆就是B,C两堆之和 2020-10-29 …