给出下列的代码,则以下哪个选项返回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;
A: t. equals(
B: ;
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;
- 给出下列的程序段,则哪个选项返回true ( ) String s="hello"; String t="hello"; char c[]='h','e','l','l','o'; A: equals(t); B: Lequals(c); C: s==t; D: t==c;
- 给出下列的程序段,则哪个选项返回true ( ) String s="hello"; String t="hello"; char c[]={'h','e','l','l','o'}; A: equals(; B: Lequals(; C: s==t; D: t==c;
- 给出下面的代码String s= "hello";String t = "hello";char c[] = {'h','e','l','l','o'};下列选项里,哪些返回true? [] A: s.equals(t); B: t.equals(c); C: s==t; D: t.equals(new String("hello")); E: t==c;
- String s=new String(“hello”);String t =new String(“hello”);char c [ ] ={‘h’,’e’,’l’,’l’,’o’};下列哪些表达式返回true ? A: s.equals(t); B: t.equals(c); C: s= =t ; D: t.equals (new String(“hello”));