• 2022-06-06
    如果有以下关于String[][]的程序代码:String[][] strs = new String[2][5];以下描述正确的是( )
    A: 产生10个String实例
    B: 产生2个String实例
    C: 产生0个String实例
    D: 编译失败
  • C

    内容

    • 0

      以下程序运行结果为? public class Q { public static void main(String argv[]) { String  a[]= new String[5]; System.out.println(a[0]); } }

    • 1

      数组x定义:String x&#91; &#93;&#91; &#93;=new int&#91;3&#93;&#91;2&#93;; x&#91;0 &#93;&#91;0 &#93;=”abc”, x&#91;0 &#93;&#91;1&#93;=”12345”;<br/>则 x.length 的值为______ ,x&#91;0&#93;&#91;1&#93;.leng()的值为______ 。

    • 2

      定义名为“学号”的属性,该属性的类型为“string”,该属性在XML中必须出现,下面正确的选项是( )。 未知类型:{'options': ['&#91;!attribute name="学号" type="string" use="required" /&#93;', '&#91;attribute name="学号" type="string" use="prohibited" /&#93;', '&#91;attribute name="学号" type="string" use="required" /&#93;', '&#91;attribute name="学号" type="string" use="optional" /&#93;'], 'type': 102}

    • 3

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

    • 4

      ​‏下面代码的运行结果为:( )‏​‏public class Qlac{static String arr&#91;&#93; = new String&#91;5&#93;;public static void main(String args&#91; &#93;) {System.out.println(arr&#91;1&#93;);}} A: 编译正确,运行时将产生错误 B: 输出0 C: 输出null D: 编译时将产生错误