作业视频教务托管壹叁路路贰陆陆壹〇肆〇
简答题
题目 System.out.println( “5 + 5 = ” + 5 + 5);语句的输出结果是
答案 5 + 5
题目请阅读下面的程序publ ic classTest{publ icstaticvoid main(String[] args) { int x = 3; if (x > 5){ System.out.println("a"); } else{System.out.println("b"); } } }程序的运行结果是 a.true b. false c.a d.b
答案D
题目请阅读下面的程序。 publ ic class Test{ publ icstaticvoid main(String[]args) { inta=0; int b=0; for(int i= 1; i<= 5; i++) { a = i%2;whi le (a-- >= 0){b++; } }System.out.println( “a=” +a+ “,b=” +
b); } }下列选项中哪一个是正确的运行结果 a.a=8,b=-2b.a=-2,b=8c.a=3,b=0d.a=0,b=3
答案 B
题目请阅读下面的程序publ ic classTest{publ icstaticvoid main(String[] args) { int a[ ]={2,0,4, 1,8, 3,5};int temp; for (int i =0; i < a.length - 1; i++) { for (intj=a. length- 1;j > i;j--) { if(a[j] <a[j - 1]) {temp=a[j];a[j] = a[j - 1]; a[j - 1] = temp; } } } for (Integer i : a){System.out.print(i); } } }下列选项中哪个是程序的运行结果 a.8543210b.0123458c.2041835d.以上答案都丌对
答案 B
题目请阅读下面的代码String s1=new String("abc");String s2=s1.intern(); String s3="abc";System.out.println(s1==s2);
System.out.println(s2==s3);
System.out.println(s1==s3);下列选项中程序的输出结果为 a. false true false b. false true true c. falsefalse true d. false false false
答案A
题目请阅读下面的代码classA{ intx; static inty;voidfac(String s){System.out.println( “字符串” +s); } }下
TmhHost是一家国内正规公司,具备ISP\ICP等资质,主营国内外云服务器及独立服务器租用业务,目前,商家新上香港三网CN2 GIA线路VPS及国内镇江BGP高防云主机,其中香港三网CN2 GIA线路最低每月45元起;同时对美国洛杉矶CN2 GIA线路高防及普通VPS进行优惠促销,优惠后美国洛杉矶Cera机房CN2 GIA线路高防VPS季付99元起。香港CN2 GIA安畅机房,三网回程CN2 ...
Hostio是一家成立于2006年的国外主机商,提供基于KVM架构的VPS主机,AMD EPYC CPU,NVMe硬盘,1-10Gbps带宽,最低月付5欧元起。商家采用自己的网络AS208258,宿主机采用2 x AMD Epyc 7452 32C/64T 2.3Ghz CPU,16*32GB内存,4个Samsung PM983 NVMe SSD,提供IPv4+IPv6。下面列出几款主机配置信息。...
六一云互联六一云互联为西安六一网络科技有限公司的旗下产品。是一个正规持有IDC/ISP/CDN的国内公司,成立于2018年,主要销售海外高防高速大带宽云服务器/CDN,并以高质量.稳定性.售后相应快.支持退款等特点受很多用户的支持!近期公司也推出了很多给力的抽奖和折扣活动如:新用户免费抽奖,最大可获得500元,湖北新购六折续费八折折上折,全场八折等等最新活动:1.湖北100G高防:新购六折续费八折...