正在加载图片...
return score; 则类Person和类Student的关系是( A、包含关系 B、继承关系 C、关联关系 D、上述类定义有语法错误 17.在下面指定的位置添加哪个选项中定义的方法,编译时候会产生错误? () class B( float x=1.0f; public float getNum({ return x) /此处添加选项中的方法 A.public float getNum(int y)(return x+y:} B.public float getNum(float d)(return x+d;} C.public float getNum(double d)(return (int)(x+d);} D.public double getNum()(return x:} 18.按钮可以产生ActionEvent事件,实现哪个接口可处理此事件() A、FocusListener B、ComponentListener C、WindowListener D、ActionListener 第4页共10页 第 4 页 共 10 页 } return score; }} 则类 Person 和类 Student 的关系是( )。 A、包含关系 B、继承关系 C、关联关系 D、上述类定义有语法错误 17. 在下面指定的位置添加哪个选项中定义的方法,编译时候会产生错误? ( ) class B{ float x=1.0f; public float getNum(){ return x;} //此处添加选项中的方法 } A. public float getNum(int y) {return x+y;} B. public float getNum(float d) {return x+d;} C. public float getNum(double d) {return (int)(x+d);} D. public double getNum() {return x;} 18. 按钮可以产生 ActionEvent 事件,实现哪个接口可处理此事件( ) A 、FocusListener B 、ComponentListener C 、WindowListener D 、ActionListener
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有