[单选题]

顺序执行下列程序语句后,则b的值是 String a="Hello"; String b=a.substring(0,2);

A.Hello

B.hello

C.He

D.null

参考答案与解析:

相关试题

顺序执行下列程序语句后,则b的值是 String a = "Hello"; St

[单选题]顺序执行下列程序语句后,则b的值是 String a = "Hello"; String b = a.substring(0,2);A.HelloB.helloC.HelD.null

  • 查看答案
  • 顺序执行下列程序语句后,则b的值是()。String a="Hello";Str

    [单选题]顺序执行下列程序语句后,则b的值是( )。 String a="Hello"; String b=a.substring(0,2);A.HelloB.helloC.HeD.null

  • 查看答案
  • 顺序执行下列程序语句后,则b的值是()。String a=Hello:Strin

    [单选题]顺序执行下列程序语句后,则b的值是( )。 String a=Hello: String b=a.substring(0,2);A.HelloB.helloC.HelD.null

  • 查看答案
  • 假设有以下代码:String s="hello";String t="hello

    [单选题]假设有以下代码: 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"));

  • 查看答案
  • 表达式"hello" instance of String返回的值是哪项?()

    [单选题]表达式"hello" instance of String返回的值是哪项?()A . trueB . falseC . 1D . 0

  • 查看答案
  • String s = "Hello";s = s £« " world!";这两

    [试题]String s = "Hello";s = s + " world!";这两行代码执行后,原始的String 对象中的内容到底变了没有?

  • 查看答案
  • String s = "Hello";s = s £« " world!";这两

    [试题]String s = "Hello";s = s + " world!";这两行代码执行后,原始的String 对象中的内容到底变了没有?

  • 查看答案
  • 给出下列的代码,则以下()选项返回true。String s="hello";S

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

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

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

  • 查看答案
  • 顺序执行下列程序语句后,则b的值是String a="Hello";String