首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下列代码的编译或执行结果是( )。 public class Myval { public static void mai n (stri ng args[]){ MyVal m =ne w MyVal (); m.aMethod (); }
下列代码的编译或执行结果是( )。 public class Myval { public static void mai n (stri ng args[]){ MyVal m =ne w MyVal (); m.aMethod (); }
admin
2012-12-02
64
问题
下列代码的编译或执行结果是( )。
public class Myval {
public static void mai n (stri ng args[]){
MyVal m =ne w MyVal ();
m.aMethod ();
}
public void aMethod (){
boolean b []=ne w Boolean [5];
Syste m.out .pri ntln(b[0]);
}
}
选项
A、1
B、null
C、0
D、编译错误
答案
A
解析
boolean 类型的变量值只有ture 或false ,b[0]的默认初始值为false。
转载请注明原文地址:https://jikaoti.com/ti/SbkiFFFM
本试题收录于:
二级Java题库NCRE全国计算机二级分类
0
二级Java
NCRE全国计算机二级
相关试题推荐
由于某化肥厂长期排污,该地域内两个村庄几年来多人患有罕见的严重疾病,根据《环境保护法》的规定,下列哪一选项是错误的?()
下列关于计算机通讯技术的表述不正确的是()。
根据《中华人民共和国公务员法》关于公务员义务的规定,下面哪项不属于公务员的义务?()
亚太经合组织逐步形成了自己独特的合作方式,即“APEC”方式,这一合作方式的内容是()。①承认多样性②强调协商一致③强调互惠互利④强调自主自愿⑤强调灵活性⑥
要计算某高三学生在四次外语模拟考试中得到四个分数的平均分数,算法如下:每次选出其中的三个分数算出它们的平均数,再加上另外一个分数,用这种方法算了四次,分别得到以下四个分数:86,92,100,106。请你算出该学生这四次模拟考试成绩的平均分数是()
行政机关制定的除行政法规和规章以外的其他规范性文件,在设定行政处罚上()。
可能多数人都会认为,我们的五官是感知外部世界的窗口,五官感觉非常真实而精确地反映着外部世界的现实。殊不知,我们信赖有加的感官事实上也会“欺骗”我们,我们所感知的有可能并非是真实世界的反映,各种感官知觉,特别是视觉,有时只是大脑的幻觉和虚构。加拿大不列颠哥伦
对下列语句排序正确的一项是()。①也许是月亮的香气吧,我这么想②看见蛎粉墙上印着我的身影,我于是重又意识到了我③我心中不起一切杂念,大约历一刻钟之久,才回转身来④从江岸直到我的楼下是一大片沙坪,月光照着,茫然一白,但带点儿青的意
某中学高三年级有三个班,高考前有一个免试保送升学名额,分别来自三个班的候选人的成绩如下:请选用不同的综合方法,帮助学校领导做出决策,决定保送对象,并评价其合理性。
设xOy平面第一象限中有曲线:y=y(x),过点A(0,一1),y’(x)>0.M(x,y)为上任意一点,满足:弧段的长度与点M处的切线在x轴上的截距之差为一1.(Ⅰ)导出Y=y(x)满足的微分方程和初始条件;(Ⅱ)求曲线的表达式.
随机试题
When27yearsofage,Burnsfirstattractedliteraryattention,andinthesamemomentsprangtothefirstplaceinScottishlet
下列属于激素替代治疗的是
非上市债券作为一种投资工具和股票投资相比,具有()的特点。
儿童能以命题形式思维,则其认知发展已达到()。
下列关联词使用恰当的一项是()。
设f(x)=sint2dt,g(x)=x3+x4,则当x→0时,f(x)是g(x)的().
在窗体中有一个名称为run35的命令按钮,单击该按钮从键盘接收学生成绩,如果输入的成绩不在0到100分之间,则要求重新输入;如果输入的成绩正确,则进入后续程序处理。rtm35命令按钮的Click的事件代码如下:PrivateSubrun35_
Howfitareyourteeth?Areyoulazyaboutbrushingthem?Neverfear:Aninventorisonthecase.Anelectrictoothbrushsenses
Workingatypewriterbytouch,likeridingabicycleorstrollingonapath,isbestdonebynotgivingitaglancingthought.O
Ascientistwhowantstopredictthewayinwhichconsumerswillspendtheirmoneymuststudyconsumerbehavior.Hemustobtain
最新回复
(
0
)