下列程序段的输出结果是( )。 String MyStr="Hello,"; Mystr=MyStr + "World!"; System.out.println(Mystr);A.Hello,World!B.Hello,C.World!D.该程序段有语法错误

下列程序段的输出结果是( )。 String MyStr="Hello,"; Mystr=MyStr + "World!"; System.out.println(Mystr);

A.Hello,World!

B.Hello,

C.World!

D.该程序段有语法错误


相关考题:

下列程序段的输出结果是( )。 String MyStr="Hello,"; MyStr=MyStr+ "World!"; System.out.println(MyStr);A.Hello, World!B.Hello,C.World!D.该程序段有语法错误

下列程序段的输出结果是( )。 String MyStr="Hello,"; MyStr=MyStr+"World!"; Sysmm.out.println(MyStr);A.Hello,World!B.Hello,C.World!D.该程序段有语法错误

下列程序段的输出结果是 String MyStr = "Hello,"; MyStr = MyStr + "World!"; System.out.println(MyStr);A.Hello,World!B.Hello,C.World!D.该程序段有语法错误

下列程序段的输出结果是 ( ) String MyStr="Hello,"; MyStr=MyStr+"World!"; System.out.println(MyStr);A.Hello,World!B.Hello.C.World!D.该程序段有语法错误

下列程序的输出结果是( )。 public class Test { public static void main (String[] args) { String s="hello"; s.replace ('r','m'); System.out.println(s); } }A.helloB.HELLOC.hemmoD.HEMMO

语句 System.out.println("Hello,world!"+4+8);的输出结果是Hello,world!48。() 此题为判断题(对,错)。

下面能够对字符串进行排序的方法有错误的是A.def sort1(mystr):#mystr是字符串列表 mystr.sort()#B.def sort2(mystr):#mystr是字符串列表 n=len(mystr) for i in range(n): j=i m=j while j<n: if(mystr[j]<mystr[m]): m=j j+=1 mystr[i],mystr[m]=mystr[m],mystr[i]#C.def sort3(mystr):#mystr是字符串列表 #python的全局排序函数 mystr=sorted(mystr) return mystr#D.def sort4(mystr):#mystr是字符串列表 #冒泡排序 i=j=0 n=len(mystr) while(i<n-1): j=0 while j<n-i-1: if mystr[j]>mystr[j+1]: mystr[j],mystr[j+1] =

对于下列程序,哪个叙述是正确的?() public class Test { public static void main(String[] args) { int m=100; if(m=100){ System.out.println("hello"); System.out.println("你好"); } else{ System.out.println("ok"); System.out.println("好的"); } } }A.出现编译错误。B.程序输出的结果是:ok好的C.程序输出的结果是:okD.程序输出的结果是:hello你好

5、下面能够对字符串进行排序的方法有错误的是A.def sort1(mystr):#mystr是字符串列表 mystr.sort()###SXB###B.def sort2(mystr):#mystr是字符串列表 n=len(mystr) for i in range(n): j=i m=j while jn: if(mystr[j]mystr[m]): m=j j+=1 mystr[i],mystr[m]=mystr[m],mystr[i]###SXB###C.def sort3(mystr):#mystr是字符串列表 #python的全局排序函数 mystr=sorted(mystr) return mystr###SXB###D.def sort4(mystr):#mystr是字符串列表 #冒泡排序 i=j=0 n=len(mystr) while(in-1): j=0 while jn-i-1: if mystr[j]mystr[j+1]: mystr[j],mystr[j+1] =