给出下列的代码,则以下哪个选项返回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;

给出下列的代码,则以下哪个选项返回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;


相关考题:

假设有以下代码: 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!";

在下画线处填入代码,使程序正常运行并且输出“Hello!”。class Test ______ {public staric void maim (string[] args) {Test t=new Test();t.start();}public void run() {System.out.println("Hello!");}}

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

给出下列的代码则以下哪个选项返回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;

给出下列的代码,则以下( )选项返回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;

给出下面程序: 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

【单选题】8.7 若有以下程序代码,则程序运行结果正确的是() public class DemoMain { public static void main(String []s){ String a = new String("hello"); String b = new String("hello"); String c = "hello"; String d = a; System.out.print((a==d)+" "+(a==b)+" "+(a==c)); } }A.true false trueB.true false falseC.true true falseD.false true true