• 2022-05-28
    下面的哪些程序片断可能导致错误?()
    A: Strings=“Gonewiththewind”;Stringt=“good“;Stringk=s+t;
    B: Strings=“Gonewiththewind”;Stringt;t=s[3]+“one”;
    C: Strings=“Gonewiththewind”;Stringstandard=s.toUpperCase();
    D: Strings=“homedirectory”;Stringt=s–“directory”;
  • A,B,D

    内容

    • 0

      It's cash given with no strings touched.

    • 1

      下面的哪些程序片断可能导致错误?( ) A: String s=”Hello”; String t=,,World"; String k=s+t; B: String s=,,Hello";String t;t=s[3]+"one"; C: String s="Hello,,;String standard = s.tollpperCase(); D: String s="Hello World”;String t=s-”World”;

    • 2

      下面的哪些程序片断可能导致错误?( )。 A: String s="Gone with the wind";String t;t=s[3]+"one"; B: String s="Gone with the wind";String t="good";String k=s+t; C: String s="Gone with the wind";String standard=s.toUpperCase(); D: String s="home directory";String t=s-"directory";

    • 3

      给定如下Java代码,编译运行时,以下()语句的值是true。 Strings=”hello”; Stringt=”hello”; Stringe=newString(”hello”); charc[]={‘h’,e’,’l’,’l’,o’};

    • 4

      Java中,以下代码会报错会报错的两项是() A: String s = "Gone with the wind"; String t = " good "; String k = s + t; B: String s = "Gone with the wind"; String t; t = s[3] + "one"; C: String s = "Gone with the wind"; String standard = s.toUpperCase(); D: String s = "home directory"; String t = s - "directory";