首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
类Test定义如下,将下列哪个方法插入③行处是不合法的? ① public class Test { ② public float Method(float a,float b) { } ③ ④ }
类Test定义如下,将下列哪个方法插入③行处是不合法的? ① public class Test { ② public float Method(float a,float b) { } ③ ④ }
admin
2009-01-15
27
问题
类Test定义如下,将下列哪个方法插入③行处是不合法的? ① public class Test { ② public float Method(float a,float b) { } ③ ④ }
选项
A、public float Method(float a,float b,float c) { }
B、public float Method(float c,float d){ }
C、public int Method(int a,int b){ }
D、private float Method(int a,int b,int c){ }
答案
2
解析
此题主要考查方法重载,方法的重载是指多个方法可以享有相同
的名字,但参数的数量或类型必须不相同(采用不同的形式参数列表)。选项B)不符合
方法重载的要求。
转载请注明原文地址:https://jikaoti.com/ti/HKb0FFFM
本试题收录于:
二级Java题库NCRE全国计算机二级分类
0
二级Java
NCRE全国计算机二级
相关试题推荐
(1)在考生文件夹下建立如下图所示的表单文件form_three,表单名为forml。标签控件命名为Ln,文本框控件命名为Textn,命令按钮控件命名为Commands。表单运行时在文本框中输入职员号,单击“开始查询”命令按钮查询该职员所经手的订购单信息(
1.扩展VisualFoxPro基类Form,创建一个名为MyForm的自定义表单类。自定义表单类保存在名为myclasslib的类库中。自定义表单类MyForm需满足以下要求:(1)其AutoCenter属性的默认值为.T.。(2)
在SQL语言中,删除表命令的关键词是()。
假设使用DIMENSIONarr(5)定义了一个一维数组arr,正确的赋值语句是()。
假设在表单设计器环境下,表单中有一个复选框且已经被选定为当前对象。现在从属性窗口中选择Value属性,然后在设置框中输入T。请问以上操作后,复选框Value属性值的数据类型为()。
在下面的表达式中,运算结果是逻辑假的是()。
在考生文件夹下完成下列操作:(1)建立一个文件名和表单名均为formtest的表单,表单中包括一个标签(Labell)、一个列表框(Listl)、一个表格(Gridl),如图3-3所示。(2)在表单的数据环境中添加“学院表”和“教师表”。(3)
下列方法中,不属于软件调试方法的是()。
(1)建立一个文件名和表单名均为two的表单,然后为表单two建立一个名为quit的新方法(单击选择表单后,从“表单”菜单中选择“新建方法程序”命令),并在该方法中写一条语句Thisform.release:最后向表单中添加一个命令按钮(Commandl)
在VisualFoxPro中,表示2012年9月10日10点整的日期时间常量是
随机试题
我们常说:无知者无畏,这是一种贬义的说法。但是,有时候,正是由于不知道面临着怎样的境况,我们才会无畏地去面对生活,也相信自己能够克服任何闲难。但是,一旦我们清楚地看到了自己的处境,我们反而会被自己的心灵限制住,而无法成功战胜那些本来可以克服的困难。任何时候
在发生火灾的情况下,当建筑物内()时,可利用消防车或机动泵等通过消防水泵接合器向室内消防给水管网输送消防用水。
物体成像在视网膜之前称为
下列关于提高脉冲多普勒检测血流速度的方法,不正确的是
你考虑下列哪项诊断最有助于诊断的检查是
比重瓶凝点
下列做法中,符合会计账簿记账规则的有()。
按《UCP600》规定,如信用证规定“在或大概在某月某日内装运”,则为前后10天内装运,起讫日期包括在内。()
若定义DATA DW 123H 执行MOV BL,BYTE PTR DATA 指令后.(BL)=______。
She______pears,peachesandotherjuicyfruits.
最新回复
(
0
)