• 2022-06-11
    下列定义字符串数组的语法正确的是( )?
    A: String[] list = new String[]{"red", "yellow", "green"};
    B: String list = new String{"red", "yellow", "green"};
    C: String list = {"red", "yellow", "green"};
    D: String[] list = {"red", "yellow", "green"};
  • A,D

    举一反三

    内容

    • 0

      下列值不为true的表达式有(  )。 A: "john" = = "john"  B:  "john".equals("john") C: "john" = "john" D:  "john".equals(new String("john")) 

    • 1

      根据用户在文本框txtName中输入的姓名对Student表进行查询,以下SQL语句定义正确的是__________________。 A: String sql="Select * from Student where Sname="+txtName.getText(); B: String sql="Select * from Student where Sname='"+txtName.getText()+"'"; C: String sql="Select * from Student where Sname like "+txtName.getText(); D: String sql="Select * from Student where Sname like '"+txtName.getText()+"'";

    • 2

      下面( )是ID的样式规则定义。 A: TR{clore:red;font-family:"隶书";font-size:24px;} B: H2{color:red;font-family:"隶书";} C: D: grass{color:green;font- family:"隶书"; font-size:24px;} E: P{background-color: F: CCFF33;text-align:left;}

    • 3

      Word中插入数学公式的方法是()。 A: "插入"→"形状"→"公式" B: "开发工具"→"公式" C: "插入"→"公式"→"插入新公式" D: "引用"→"插入"→"公式"

    • 4

      下面的哪些程序片断可能导致错误?( )。 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";