下列定义字符串数组的语法正确的是( )?
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: 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"};
举一反三
- 定义并初始化一个用于存放我们国家的四个直辖市的数组cityName,四个直辖市为:北京,上海,天津,重庆. 正确的是_________ A: String[] cityName=new String[4]{"北京","上海","天津","重庆"}; B: String[] cityName=new String[]{"北京","上海","天津","重庆"}; C: String[] cityName={"北京","上海","天津","重庆"}; D: String cityName = new String[4] { "北京", "上海", "天津", "重庆" };
- 下列语句中,可以用来实现改变 HTML 文档背景颜色的是 ( )。 A: document.bgColor=" yellow " B: document.bgColor( )="yellow " C: document.bgColor("yellow") D: document.background=" yellow "
- 29. ( ) refers to A list of undesirable persons. A: "blacklist" B: "Whitelist" C: "Green List" D: "Red List"
- 下面代码能够实现,单击鼠标给按钮添加边框的是() A: $("button").click(function(){ $(this).css("border","1px solid red") }) B: $("button").click(function(){ $(this).css(border,1px solid red) }) C: $("button").dbclick(function(){ $(this).css("border","1px solid red") }) D: $("button").mouseover(function(){ $(this).css("border","1px solid red") })
- <icon>是图标组件,以下哪句代码可以实现一个红色、40像素大小的搜索图标?( ) A: <icon type="search" size="40px" color="red"></icon> B: <icon type="discover" size="40" color="red"></icon> C: <icon type="search" size="40" color="red"></icon> D: <icon type="discover" size="40px" color="red"></icon>