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

A:equals(t); B: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: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:equals (c) ; C:s==t; D:t==c;

给出下列的代码,则以下哪个选项返回true
String s="hello";
String t="hello";
char c []= 'h','e','1','1','o';

A:equals(t); B:equals(c); C:s==t; D:t==c;

假设有以下代码:
String s="hello";
String t="hello";
char c[ ]='h','e','l','l','o';
下列选项中,返回false的语句是______。

A:equals(t); B:equals(c); C:s==t; D:equals(new String("hello"));

下面程序的执行的结果是______。 public class ex48 { public static void main(String[] args) { String s1 = "abc" + "def"; String s2 = new String(sl); if(s1 == s2) System.out.println ( "== succeeded"); if (s1. equals (s2) ) System.out.println (".equals ( ) succeeded"); } }

A:== succeeded B:.equals() succeeded C:== succeeded D:不输出任何结果 .equals() succeeded

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

A:equals(; B:equals(; C:s==t; D:t==c;

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

A:equals(; B:equals(; C:s==t; D:equals(new String("hello"));

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

A:equals(; B:equals(; C:s = =t D:t = = c;

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

A:equals ( ; B:equals ( ; C:s==t; D:t==c;

微信扫码获取答案解析
下载APP查看答案解析