题目内容 (请给出正确答案)
[单选题]

下列程序的输出结果是importjava.io.*;publicclassabc{publicstaticvoidmain(Stringargs[]){Strings1="Hello!";Strings2=newString("World!");System.out.println(s1.concat(s2));}}

A.false

B.Hello!

C.Hello!Wofld!

D.12

提问人:网友18***192 发布时间:2022-01-07
参考答案
查看官方参考答案
如搜索结果不匹配,请 联系老师 获取答案
网友答案
查看全部
  • · 有4位网友选择 A,占比14.29%
  • · 有4位网友选择 C,占比14.29%
  • · 有3位网友选择 B,占比10.71%
  • · 有3位网友选择 B,占比10.71%
  • · 有2位网友选择 C,占比7.14%
  • · 有2位网友选择 A,占比7.14%
  • · 有2位网友选择 D,占比7.14%
  • · 有2位网友选择 A,占比7.14%
  • · 有2位网友选择 D,占比7.14%
  • · 有2位网友选择 B,占比7.14%
  • · 有1位网友选择 C,占比3.57%
  • · 有1位网友选择 D,占比3.57%
匿名网友 选择了D
[54.***.***.89] 1天前
匿名网友 选择了C
[154.***.***.241] 1天前
匿名网友 选择了A
[192.***.***.25] 1天前
匿名网友 选择了C
[40.***.***.233] 1天前
匿名网友 选择了C
[247.***.***.89] 1天前
匿名网友 选择了D
[186.***.***.0] 1天前
匿名网友 选择了B
[116.***.***.149] 1天前
匿名网友 选择了B
[211.***.***.158] 1天前
匿名网友 选择了A
[165.***.***.120] 1天前
匿名网友 选择了C
[233.***.***.208] 1天前
匿名网友 选择了D
[66.***.***.207] 1天前
匿名网友 选择了A
[211.***.***.112] 1天前
匿名网友 选择了A
[38.***.***.89] 1天前
匿名网友 选择了C
[227.***.***.111] 1天前
匿名网友 选择了B
[147.***.***.239] 1天前
匿名网友 选择了B
[108.***.***.125] 1天前
匿名网友 选择了A
[233.***.***.109] 1天前
匿名网友 选择了B
[252.***.***.20] 1天前
匿名网友 选择了A
[93.***.***.192] 1天前
匿名网友 选择了A
[231.***.***.245] 1天前
加载更多
提交我的答案
登录提交答案,可赢取奖励机会。
更多“下列程序的输出结果是importjava.io.*;publ…”相关的问题
第1题
阅读下面程序,判断它的输出结果?PublicclassHello{publicstaticvoidmain(Stringargs[]){inti=0;Stringstr[]={"11","22"};while(i<3){System.out.print(str[i]);i++;}}}

A、1122

B、1122java.lang.ArrayIndexOutOfBoundsException:2atHello.main...

C、java.lang.ArrayIndexOutOfBoundsException:2atHello.main...

D、1122Error!

点击查看答案
第2题
阅读下面程序: public class ThreadTest { public static void main(String args[]) throws Exception { int i=0; Hello t=new Hello(); ______; While(true) } System.out.println("Good Morning"+i++); if(i==2&&t.isAlive()) { System.out.println("Main waiting for Hello!"); t.join(); //等待t运行结束 } If(i==5)break:} } } class Hello extends Thread } int i; public void run() while(true) { System.out.println("Hello"+i++): If(i==5)break; } } } 为使该程序正确执行,下画线处的语句应是

A.t.sleep()

B.t.yield()

C.t.interrupt()

D.t.start()

点击查看答案
第3题
指出下列程序中的错误,并简洁说明错误原因 class BC { public: void BC() { } };
点击查看答案
第4题
【单选题】若有以下程序:的运行结果: class Array{ public static void main(){ int []a={1,2,4,3}; try{ for(int i=0;i<a.lenth;i++){ int a1="a[i]/a[i+1];}" }catch(airthmeticexception e){system.out.println(“airthmeticexception”);} catch(indexouterofboundsexception ){ system.out.println(“indexouterofboundsexception”);} }} 则程序运行结果为(> A、AirthmeticException

B、IndexOuterOfBoundsException

C、无显示

D、编译错误

点击查看答案
第5题
(File类)下列程序运行后的结果可能是________。import java. io. *; public class Test { public static void main (String [] args) { File file =new File ( "hello . txt" ) ; if (file. exists () ) { file.delete () ; } else { try { file . createNewFile ( ) ; } catch (Exception e ) { e .printStackTrace ( ) ; } } } }

A、如果文件不存在 ,则程序退出

B、如果文件已经存在 , 则程序退出

C、如果文件已经存在,则保留该文件

D、如果文件不存在 , 则创建该文件

点击查看答案
第6题
用语言描述下面的程序:namespace StringTest{ class Program { static void Main(string[] args) { int nResult = 0; bool bResult = false; string str = "hello everyOne!!"; bResult = str.Contains("e"); Console.WriteLine("Contains(\"e\") = " + bResult); nResult = str.IndexOf("e"); Console.WriteLine("IndexOf(\"e\") = " + nResult); nResult = str.LastIndexOf("e"); Console.WriteLine("LastIndexOf(\"e\") = " + nResult); } } }
点击查看答案
第7题
请阅读下面的程序 class WhileDemo4 { public static void main(String[] args) { int n = 5; while (n > 10) { System.out.print(n); n++; } } } 下列选项中,哪一个是程序运行的结果

A、无输出

B、输出56789

C、死循环

D、编译错误

点击查看答案
第8题
public class Test2 { public static void main(String[] args) { int arr[]={7,6,15,4,3,12,1}; find(arr); show(arr); } public static void show(int a[]){ for(int i=0;i<a.length;i++) { if(a[i]> 6) System.out.print("a["+i+"]:"+a[i]+","); } } public static void find(int a[]){ int max=0; for(int i=0;i <a.length;i++) { max="a[i];" system.out.println("max:"+a[i]); } 执行结果: ________>
点击查看答案
第9题
写出下面程序的运行结果,了解while语句的使用。public class Useli3 { public static void main(String args[ ]){ int n = 9; while(n>6){ n--; System.out.print(n); } } }
点击查看答案
第10题
public class ArrayTest{ public static void main ( String args[] ) { String s[] = new String[5]; System.out.println(s[0]); } } 哪个叙述为真?

A、运行出错

B、输出 0

C、输出 null

D、出现编译错误

点击查看答案
账号:
你好,尊敬的用户
复制账号
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改
欢迎分享答案

为鼓励登录用户提交答案,简答题每个月将会抽取一批参与作答的用户给予奖励,具体奖励活动请关注官方微信公众号:简答题

简答题官方微信公众号

警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

微信搜一搜
简答题
点击打开微信
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反简答题购买须知被冻结。您可在“简答题”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
微信搜一搜
简答题
点击打开微信