首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下面程序段的输出结果是( )。 public class Test { public static void main(String args[ ]){ int x,y; x=(int)Mat
下面程序段的输出结果是( )。 public class Test { public static void main(String args[ ]){ int x,y; x=(int)Mat
admin
2013-03-01
60
问题
下面程序段的输出结果是( )。 public class Test { public static void main(String args[ ]){ int x,y; x=(int)Math.sqrt(5)/2+(int)Math.random()*5/2; y=(int)Math.sqrt(3)/2+(int)Math.random()*3/2; if (x>y) System.out.println("x>y"); else if (x==y) System.out.println("x=y"); else System.out.println("x<y"); } }
选项
A、x>y
B、x=y
C、x<y
D、编译错误
答案
1
解析
转载请注明原文地址:https://kaotiyun.com/show/Ew2p777K
本试题收录于:
二级Java题库NCRE全国计算机二级分类
0
二级Java
NCRE全国计算机二级
相关试题推荐
下列程序的输出结果是______。publicclassexl5{publicstaticvoidmain(String[]args){in
下列______不是面向对象程序设计方法的特点。
将E-R图转换到关系模式时,实体与联系都可以表示成______。
一般地,二叉树可以有______种基本形态。
下列叙述中,不属于测试的特征的是
在软件生产过程中,需求信息的给出是
Java虚拟机中的()模块既负责管理针对各种类型数据库软件的JDBC驱动程序,也负责和用户的应用程序交互,为Java应用程序建立起基于JDBC机制的数据库连接。
下面是一个Java的应用程序,其输出结果是publicclassTestll{publicstaticvoidmain(Stringargs[]){charc=’i’;for(intn;6;n<11;m+
随机试题
毛泽东在探索中国社会主义建设道路过程中提出,社会主义的发展阶段可能分为()
建筑石膏的特性包括()。
监理单位对其验收合格项目的施工质量负()。
金砖四国
目前主要的运营网络有电信网、______和计算机网。
Ifyouintendusinghumorinyourtalktomakepeoplesmile,youmustknowhowtoidentifysharedexperiencesandproblems.Your
In1919Britainexperienceditslargesteverreductioninindustrialworkinghours,to48perweek.InDowie’sviewthe48-hour
1 Peoplehavebeenpaintingpicturesforatleast30,000years.Theearliestpictureswerepaintedbypeoplewhohuntedanimals
It’snouse_______menottoworry.
Underproperconditions,soundwaveswillbereflectedfromahillsideorothersuchobstruction.Soundtravelsattherateofa
最新回复
(
0
)