给出下面的代码,则以下( )选项返回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;
第1题:
以下选项中正确的语句组是( )。
A.char s[]; s="HELLO!";
B.char *s; s={"HELLO!"};
C.char s[10]; s="HELLO!";
D.char *s; s="HELLO!";
第2题:
给出下列的代码,则以下( )选项返回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;
第3题:
【单选题】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 true
B.true false false
C.true true false
D.false true true
第4题:
给出下列的代码则以下哪个选项返回true? String s = "hello" ; String s = "hello" ; char c[] = { 'h' ,'e','l','o'};
A.s.equals(t);
B.t.equals(c);
C.s = =t
D.t = = c;
第5题:
给出下面程序: 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 == t
D.t == c