• 2022-06-08 问题

    String s=new String(“hello”); String t =new String(“hello”); char c [ ] ={‘h’,’e’,’l’,’l’,’o’}; 下列哪些表达式返回true ?

    String s=new String(“hello”); String t =new String(“hello”); char c [ ] ={‘h’,’e’,’l’,’l’,’o’}; 下列哪些表达式返回true ?

  • 2022-06-03 问题

    与char string[]={"He Jing"};等价的语句是: A: char string[7]={'H','e',' ','J','i','n','g'}; B: char string[ ]={'H','e',' ','J','i','n','g'}; C: char string[8]={"He Jing"}; D: char string[7]={"He Jing"}; E: char string[8]="He Jing";

    与char string[]={"He Jing"};等价的语句是: A: char string[7]={'H','e',' ','J','i','n','g'}; B: char string[ ]={'H','e',' ','J','i','n','g'}; C: char string[8]={"He Jing"}; D: char string[7]={"He Jing"}; E: char string[8]="He Jing";

  • 2022-06-15 问题

    [[‘a’,’d’], [‘d’,’a’,’4’]]的类型是 A: [String.String] B: [Char, Int] C: [String] D: (String, String)

    [[‘a’,’d’], [‘d’,’a’,’4’]]的类型是 A: [String.String] B: [Char, Int] C: [String] D: (String, String)

  • 2022-06-08 问题

    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”));

    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”));

  • 2022-05-27 问题

    有如下代码:public class Test4{ public static void main(String args[]) { String str = new String("New"); char ch[] = {'B', 'e'}; change(str,ch); System.out.println(str + "," + new String(ch)); } public static void change(String str, char ch[]) { str = "Old"; ch[0] = 'H'; }}运行后输出的结果是? A: New,Be B: New,He C: Old,He D: Old,Be

    有如下代码:public class Test4{ public static void main(String args[]) { String str = new String("New"); char ch[] = {'B', 'e'}; change(str,ch); System.out.println(str + "," + new String(ch)); } public static void change(String str, char ch[]) { str = "Old"; ch[0] = 'H'; }}运行后输出的结果是? A: New,Be B: New,He C: Old,He D: Old,Be

  • 2022-05-29 问题

    59 给定以下代码,哪些语句的结果不为 true String s1 = “hello” ; String s2 = “hello” ; String s3 = new String(“hello”) ; char[] c = {‘h’,’e’,’l’,’l’,’o’}; String s4 = new String(c); A: s1.equals(s2) B: s3.equals(s4) C: s1==s2 D: s3==s4

    59 给定以下代码,哪些语句的结果不为 true String s1 = “hello” ; String s2 = “hello” ; String s3 = new String(“hello”) ; char[] c = {‘h’,’e’,’l’,’l’,’o’}; String s4 = new String(c); A: s1.equals(s2) B: s3.equals(s4) C: s1==s2 D: s3==s4

  • 2022-06-08 问题

    给出下面的代码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= "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;

  • 2022-06-08 问题

    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?() A:  s.equals(t); B:  t.equals(c); C:  s==t; D:  t.equals(new String("hello")); E:  t==c;

  • 2022-06-08 问题

    String s=”hello”;String t=”hello”;String e=new String(”hello”) ;char c[]={„h‟,e‟,‟l‟,‟l‟,o‟};给定如上Java代码,编译运行时,以下( )语句的值是true。 A: s.equals(t) B: t.equals(c) C: t== e D: t==c

    String s=”hello”;String t=”hello”;String e=new String(”hello”) ;char c[]={„h‟,e‟,‟l‟,‟l‟,o‟};给定如上Java代码,编译运行时,以下( )语句的值是true。 A: s.equals(t) B: t.equals(c) C: t== e D: t==c

  • 2022-05-27 问题

    有如下代码:public class Test{ public static void main(String args[]) { String str = new String("World"); char ch[] = {'H','e','l','l','o'}; change(str,ch); System.out.println(str + "and" + ch); } public static void change(String str, char ch[]) { str = "Changed"; ch[0] = ' C'; }}运行后输出的结果是: A: Changed and Cello B: World and Cello C: World and CelloChanged and Hello D: World and Hello

    有如下代码:public class Test{ public static void main(String args[]) { String str = new String("World"); char ch[] = {'H','e','l','l','o'}; change(str,ch); System.out.println(str + "and" + ch); } public static void change(String str, char ch[]) { str = "Changed"; ch[0] = ' C'; }}运行后输出的结果是: A: Changed and Cello B: World and Cello C: World and CelloChanged and Hello D: World and Hello

  • 1 2 3 4 5 6 7 8 9 10