创建一个标识有“关闭”按钮的语句是( )。 A: JTextField button = new JTextField("关闭"); B: JButton button = new JButton("关闭"); C: JLabel button = new JLabel ("关闭"); D: JCheckbox button = new JCheckbox("关闭");
创建一个标识有“关闭”按钮的语句是( )。 A: JTextField button = new JTextField("关闭"); B: JButton button = new JButton("关闭"); C: JLabel button = new JLabel ("关闭"); D: JCheckbox button = new JCheckbox("关闭");
新建一个流对象,下列( )选项的代码是错误的。 A: new BufferedWriter(new FileWriter("a.txt")); B: new BufferedReader(new FileInputStream("a.dat")); C: new DataOutputStream(new FileOutputStream("a.txt")); D: new ObjectInputStream(new FileInputStream("a.dat"));
新建一个流对象,下列( )选项的代码是错误的。 A: new BufferedWriter(new FileWriter("a.txt")); B: new BufferedReader(new FileInputStream("a.dat")); C: new DataOutputStream(new FileOutputStream("a.txt")); D: new ObjectInputStream(new FileInputStream("a.dat"));
下列哪个选项是创建一个标识有“关闭”按钮的语句? ( ) A: JTextField b = new JTextField("关闭"); B: JTextArea b = new JTextArea ("关闭"); C: JButton b = new JButton("关闭"); D: JCheckbox b = new JCheckbox("关闭");
下列哪个选项是创建一个标识有“关闭”按钮的语句? ( ) A: JTextField b = new JTextField("关闭"); B: JTextArea b = new JTextArea ("关闭"); C: JButton b = new JButton("关闭"); D: JCheckbox b = new JCheckbox("关闭");
点击页面的按钮,使之打开一个新窗口,加载一个网页,以下JavaScript代码中可行的是( )。 A: <input type="button" value="new" onclick="window.location='new.html';"/> B: <input type="button" value="new" onclick=" location.assign('new.html');"/> C: <form target="_blank" action="new.html"> <input type="submit" value="new"/> </form> D: <input type="button" value="new" onclick="open('new.html', '_blank') "/>
点击页面的按钮,使之打开一个新窗口,加载一个网页,以下JavaScript代码中可行的是( )。 A: <input type="button" value="new" onclick="window.location='new.html';"/> B: <input type="button" value="new" onclick=" location.assign('new.html');"/> C: <form target="_blank" action="new.html"> <input type="submit" value="new"/> </form> D: <input type="button" value="new" onclick="open('new.html', '_blank') "/>
定义并初始化一个用于存放我们国家的四个直辖市的数组cityName,四个直辖市为:北京,上海,天津,重庆. 正确的是_________ A: String[] cityName=new String[4]{"北京","上海","天津","重庆"}; B: String[] cityName=new String[]{"北京","上海","天津","重庆"}; C: String[] cityName={"北京","上海","天津","重庆"}; D: String cityName = new String[4] { "北京", "上海", "天津", "重庆" };
定义并初始化一个用于存放我们国家的四个直辖市的数组cityName,四个直辖市为:北京,上海,天津,重庆. 正确的是_________ 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"};
下列定义字符串数组的语法正确的是( )? 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"};
下面选项中,用于设置浏览器显示文本采用UTF-8编码的是 ( ) A: response.setHeader("Content-Type","text/html;charset=utf-8"); B: request.setHeader("Content-Type","text/html;charset=utf-8"); C: response.setHeader("Content-Type"," charset=utf-8"); D: request.setHeader("Content-Type"," charset=utf-8");
下面选项中,用于设置浏览器显示文本采用UTF-8编码的是 ( ) A: response.setHeader("Content-Type","text/html;charset=utf-8"); B: request.setHeader("Content-Type","text/html;charset=utf-8"); C: response.setHeader("Content-Type"," charset=utf-8"); D: request.setHeader("Content-Type"," charset=utf-8");
下列代码中给出正确的在方法体内抛出异常的是( )。 A: new throw Exception(" "); B: throw new Exception(" "); C: throws IOException(); D: throws IOException;
下列代码中给出正确的在方法体内抛出异常的是( )。 A: new throw Exception(" "); B: throw new Exception(" "); C: throws IOException(); D: throws IOException;
下列定义字体对象ft的语句中,正确的是___________。 A: Dim ft As New Font("隶书", 18) B: Dim ft As Font = New Font("隶书", 18) C: Dim ft As Font = ("隶书", 18) D: Dim ft("隶书", 18) As Font E: Dim ft = Font ("隶书", 18)
下列定义字体对象ft的语句中,正确的是___________。 A: Dim ft As New Font("隶书", 18) B: Dim ft As Font = New Font("隶书", 18) C: Dim ft As Font = ("隶书", 18) D: Dim ft("隶书", 18) As Font E: Dim ft = Font ("隶书", 18)
下列方法中,能正确创建 JavaScript 对象的是( )。 A: var txt = new Object[name:"George",price:25] B: var txt = new Object(name:"George",price:25) C: var txt = new Object{name:"George",price:25} D: var txt = new Object({name:"George",price:25})
下列方法中,能正确创建 JavaScript 对象的是( )。 A: var txt = new Object[name:"George",price:25] B: var txt = new Object(name:"George",price:25) C: var txt = new Object{name:"George",price:25} D: var txt = new Object({name:"George",price:25})