作业视频教务托管壹叁路路贰陆陆壹〇肆〇
简答题
题目 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); } }下
IMIDC发布了6.18大促销活动,针对香港、台湾、日本和莫斯科独立服务器提供特别优惠价格最低月付30美元起。IMIDC名为彩虹数据(Rainbow Cloud),是一家香港本土运营商,全线产品自营,自有IP网络资源等,提供的产品包括VPS主机、独立服务器、站群独立服务器等,数据中心区域包括香港、日本、台湾、美国和南非等地机房,CN2网络直连到中国大陆。香港服务器 $39/...
搬瓦工vps(bandwagonhost)现在面向中国大陆有3条顶级线路:美国 cn2 gia,香港 cn2 gia,日本软银(softbank)。详细带宽是:美国cn2 gia、日本软银,都是2.5Gbps~10Gbps带宽,香港 cn2 gia为1Gbps带宽,搬瓦工是目前为止,全球所有提供这三种带宽的VPS(云服务器)商家里面带宽最大的,成本最高的,没有第二家了! 官方网站:https...
ProfitServer怎么样?ProfitServer好不好。ProfitServer是一家成立于2003的主机商家,是ITC控股的一个部门,主要经营的产品域名、SSL证书、虚拟主机、VPS和独立服务器,机房有俄罗斯、新加坡、荷兰、美国、保加利亚,VPS采用的是KVM虚拟架构,硬盘采用纯SSD,而且最大的优势是不限制流量,大公司运营,机器比较稳定,数据中心众多。此次ProfitServer正在对...