首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
类Test定义如下,将下列哪个方法插入③行处是不合法的( )? ① public class Test{ ② public float Method(float a,float B) { } ③ ______ ④ }
类Test定义如下,将下列哪个方法插入③行处是不合法的( )? ① public class Test{ ② public float Method(float a,float B) { } ③ ______ ④ }
admin
2010-07-28
44
问题
类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) { }private float Method(int a,int b,int C) { }
D、private float Method(int a,int b,int C) { }
答案
2
解析
本题主要考查方法重载,方法的重载是指多个方法可以享有相同的名字,但参数的数量或类型必须不相同(采用不同的形式参数列表),选项B不符合方法重载的要求。
转载请注明原文地址:https://jikaoti.com/ti/BGH0FFFM
本试题收录于:
二级Java题库NCRE全国计算机二级分类
0
二级Java
NCRE全国计算机二级
相关试题推荐
对长度为n的线性表排序,在最坏情况下,比较次数不是n(n-1)/2的排序方法是
下列关于计算机病毒的叙述中,错误的是
下面不属于软件设计阶段任务的是
下面描述中不属于数据库系统特点的是
下面不属于需求分析阶段任务的是
下列叙述中正确的是
有两个关系R和S如下:则由关系R得到关系S的操作是
某系统总体结构图如下图所示:该系统总体结构图的深度是
下面不属于软件测试实施步骤的是
下面关于Python中函数的说法错误的是()。
随机试题
(2011年10月)领导者在处理事务中坚持一分为二、对立统一的方法,属于______。
用超声波水下法治疗时,操作错误的是
在处方书写中,“安瓿剂”可缩写为
衡量某因素与某疾病的关联强度的最好指标是
对流行性乙型脑炎具有诊断意义的特征性病变是
A.诺氟沙星B.磺胺异恶唑C.环丙沙星D.磺胺嘧啶银E.甲氧苄啶目前应用最广的氟喹诺酮类药是
具有绝热性能好、无毒、有消烟、可排除有毒气体、形成防火隔离层并对在火场灭火人员无害的泡沫灭火系统是()。
农历八月十五是中国传统节日中秋节,下面是中秋节别名的有()
设y=y(x)由方程ex+6xy+x2-1=0确定,求y’’(0).
CPU主要技术性能指标有
最新回复
(
0
)