给出下列的代码,则以下( )选项返回true。 String s="hello"; String t="hello": char c[]={'h','e','l','l','o',};A.s.equals(t);B.t.equals(c);C.s==t;D.t==c;

给出下列的代码,则以下( )选项返回true。 String s="hello"; String t="hello": char c[]={'h','e','l','l','o',};

A.s.equals(t);

B.t.equals(c);

C.s==t;

D.t==c;


相关考题:

假设有以下代码: String s="hello"; String t="hello"; char c[ ]={'h','e','l','l','o'}; 下列选项中,返回false的语句是______。A.s.equals(t);B.t.equals(c);C.s==t;D.t.equals(new String("hello"));

给出下面的代码,则以下( )选项返回true。 String s="hello"; String t="hello"; Char c[]={'h','e','l','l','o'};A.s. equals (t) ;B.t. equals (C);C.s==t;D.t==c;

以下选项中正确的语句组是( )。A)char s[];s="HELLO!";B)char*s;s={"HELLO!"};C)char s[10];s="HELLO!";D)char *s;s="HELLO!";

下列的哪个程序段可能导致错误? ( )A.String s="hello"; String t="good"; String k=s+t;B.String s="hello"; String t; t=s[3]+"one";C.String s="hello"; String standard=s.toUpperCase();D.String s="hello"; String t=s+"good";

下列哪个程序段可能导致错误?A.String s="hello"; String t= "good"; String k=s+ t;B.String s="hello"; String t; t=s[3]+"one";C.String s="hello"; String standard=s. toUpperCaseD.String s="hello"; String t =s+ "good"

给出下列的代码,则以下哪个选项返回true? String s="hello"; String t="hello"; char c []= {'h','e','1','1','o'};A)s.equals(t);A.t. equals(B.;C.s==t;D.t==c;

下面程序的输出结果是()。includeinclude"string.h"void main(){char a[]="Hello T 下面程序的输出结果是( )。 #include<iostream.h> #include"string.h" void main() {char a[]="Hello Test",b[]="Test"; strcpy(a,b); cout<<a<<end1; } A) B)C) D)A.HelloB.TestC.Hello TestD.Hello Test HelloTest

设有以下语句: char strl[]="string",str2[8],*str3,*str4="string"; 则_______不是对库函数的正确调用。A.strcpy(strl,"HELLO1");B.strcpy(str2,"HELLO2");C.strcpy(str3,"HELLO3");D.strcpy(str4,"HELLO4");

String s = "Hello";s = s + " world!";这两行代码执行后,原始的String 对象中的内容到底变了没有?

下列程序的输出结果是( )。 include include"string.h" void main() {char a[]="He 下列程序的输出结果是( )。 #include<iostream.h> #include"string.h" void main() {char a[]="Hello Test",b[]="Test"; strcpy(a,b); cout<<a<<end1; }A.HelloB.TestC.Hello TestD.Hello Test HelloTest

以下选项中正确的语句组是( )。A.char s[]; s="HELLO!";B.char *s; s={"HELLO!"};C.char s[10]; s="HELLO!";D.char *s; s="HELLO!";

下列代码段的执行结果是( )。 public class Test { public static void main(String args[ ]) { String s1= new String("hello"); String s2= new String("hello"); System.out.println(s1==s2); System.out.println(s1.equal(s2)); } }A.true falseB.true trueC.false trueD.false false

下列代码的执行结果是______。 public class ex55 { public static void main(String args[] ) { String s1=new String("hello"); String s2=new String("hello"); System.out.print (s1==s2); System.out.print (","); System.out.println (s1.equals (s2)); } }A.true, falseB.true, trueC.false, trueD.false, false

给出下列的代码则以下哪个选项返回true? String s = "hello" ; String s = "hello" ; char c[] = { 'h' ,'e','l','o'};A.s.equals(t);B.t.equals(c);C.s = =tD.t = = c;

下列的( )程序段可能导致错误。A.String s="hello": Sting t="good"; String k=s+t;B.Sting s="hello"; String t; t=s [3] + "one";C.Sting s="hello"; String standard=s.toUpperCase( );D.String s="hello": Stringt s +"good";

下列的哪个程序段可能导致错误?A.String s = "hello"; String t = "good"; String k = s + t;B.String s = "hello"; String t; t = s[3] + "one";C.String s = " hello "; String standard = s.toUpperCase( );D.String s = "hello"; String t = s + "good";

给出下面程序: public class ex51 { public static void main(String[] args) { String s = "hello"; String t = "hello"; char c[] = {'h', 'e', '1', '1', 'o'}; System. out. println (______) } } 在程序的横线处填入下列______选项后,程序输出的结果是true。A.t.equals(c)B.s.equals?C.s == tD.t == c

下列选项中,()是正确的表达式。 A、% String s = “hello world ” ;%  B、% = “hello world ” ;% C、% = “hello world ” %  D、% ! “hello world ” %

Which expressions will evaluate to true if preceded by the following code?()   String a = "hello";   String b = new String(a);   String c = a;   char[] d = { ’h’, ’e’, ’l’, ’l’, ’o’ };  A、(a == "Hello")B、(a == b)C、(a == c)D、a.equals(b)E、a.equals(d)

设String对象s="H",运行语句System.out.println(s.concat("ello!"));后String对象s的内容为"Hello!",所以语句输出为"Hello!"。

有语句String s=”hello world”; ,以下操作哪个是不合法的()A、int i=s.length();B、s=3;C、String ts=s.trim();D、String t=s+”!”

String s= "hello";     String t = "hello";  char c[] = {’h’,’e’,’l’,’l’,’o’} ;     Which return true?()   A、 s.equals(t);B、 t.equals(c);C、 s==t;D、 t.equals(new String("hello"));E、 t==c;

多选题String s= "hello";     String t = "hello";  char c[] = {’h’,’e’,’l’,’l’,’o’} ;     Which return true?()As.equals(t);Bt.equals(c);Cs==t;Dt.equals(new String(hello));Et==c;

判断题设String对象s="H",运行语句System.out.println(s.concat("ello!"));后String对象s的内容为"Hello!",所以语句输出为"Hello!"。A对B错

多选题Which expressions will evaluate to true if preceded by the following code?()   String a = "hello";   String b = new String(a);   String c = a;   char[] d = { ’h’, ’e’, ’l’, ’l’, ’o’ };A(a == Hello)B(a == b)C(a == c)Da.equals(b)Ea.equals(d)

单选题下列选项中,()是正确的表达式。A% String s = “hello world ” ;%  B% = “hello world ” ;% C% = “hello world ” %  D% ! “hello world ” %

单选题若有定义语句:char str1[] = "string", str2[8], *str3, str4[10] = "string";库函数strcpy的功能是复制字符串,以下选项中错误的函数调用是(  )。Astrcpy(str3, "HELLO!");Bstrcpy(str2, "HELLO!");Cstrcpy(str1, "HELLO!");Dstrcpy(str4, "HELLO!");