A: String[] cityName=new String[4]{"北京","上海","天津","重庆"};
B: String[] cityName=new String[]{"北京","上海","天津","重庆"};
C: String[] cityName={"北京","上海","天津","重庆"};
D: String cityName = new String[4] { "北京", "上海", "天津", "重庆" };
举一反三
- 下列定义字符串数组的语法正确的是( )? 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"};
- 下列值不为true的表达式有( )。 A: "john" = = "john" B: "john".equals("john") C: "john" = "john" D: "john".equals(new String("john"))
- 根据用户在文本框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()+"'";
- Word中插入数学公式的方法是()。 A: "插入"→"形状"→"公式" B: "开发工具"→"公式" C: "插入"→"公式"→"插入新公式" D: "引用"→"插入"→"公式"
- 定义名为“学号”的属性,该属性的类型为“string”,该属性在XML中必须出现,下面正确的选项是( )。 A: <!attribute name="学号" type="string" use="required" /> B: <attribute name="学号" type="string" use="prohibited" /> C: <attribute name="学号" type="string" use="required" /> D: <attribute name="学号" type="string" use="optional" />
内容
- 0
下面的哪些程序片断可能导致错误?( )。 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";
- 1
已知有一个名为names的空列表,如何向其中添加old_driver,rain,jack,shanshan,peiqi,black_girl 元素? A: names.append("old_driver","rain","jack","shanshan","peiqi","black_girl") B: names.extend("old_driver","rain","jack","shanshan","peiqi","black_girl") C: names.insert("old_driver","rain","jack","shanshan","peiqi","black_girl") D: names.extend(["old_driver","rain","jack","shanshan","peiqi","black_girl"])
- 2
以下哪个选项是正确的json数据格式: A: { "id": 2, "userName": admin, "passWord": 12345, "email": admin@qq.com} B: { id: 2, userName: "admin", passWord: "12345", email: "admin@qq.com"} C: { "id": 2, "userName": "admin", "passWord": "12345", "email": "admin@qq.com",} D: { "id": 2, "userName": "admin", "passWord": "12345", "email": "admin@qq.com"}
- 3
在Excel中,为表格添加边框的正确的操作是()。 A: 单击"单元格"中的"边框" B: 单击"单元格"中的"边框和底纹" C: 单击"插入"中"边框" D: 单击"插入"中"单元格"
- 4
下面语句中,正确的是( )。 A: printf("%c ","student"); B: printf("%c ","c"); C: printf("%s ",&a); D: printf("%s ","hello");