• 2022-06-06
    下面代码的输出结果是0。 String s = new String(); System.out.println(s.length());
  • 内容

    • 0

      下列代码片段执行结果是:String s=new String(”abc”); String s1=new String(s); if(s==s1){ System.out.println(”Hello”); } if(s.equals(s1)){ System.out.println(”World”); } A: Hello World B: Hello C: World D: Null

    • 1

      String s="kdaiekal";System.out.println(s.length());输出的值为___________。

    • 2

      以下程序的输出结果是 String s1="1",s2="2"; String s=s1+s2; System.out.println(s);

    • 3

      读代码:public class foo {static String s;public static void main (String[]args) {System.out.println (“s=” + s);}}结果是

    • 4

      下列程序段执行后的结果是()。 String s = new String("abcdefg"); for (int i=0; i<s.length(); i+=2){ System.out.print(s.charAt(i)); }