试题详情
- 单项选择题 import java.awt.*; public class Test extends Frame { public Test() { add(new Label(“Hello”) ); add(new TextField(“Hello”) ); add(new Button(“Hello”) ); pack(); show(); } public static void main(String args) { new Test (); } } What is the result? ()
A、 The code will not compile.
B、 A Window will appear containing only a Button.
C、 An IllegalArgumentException is thrown at line 6.
D、 A Window button will appear but will not contain the Label, TextField, or Button.
E、 A Window will appear containing a Label at the top, a TextField below the Label, and a Button below the TextField.
F、 A Window will appear containing a Label on the left, a TextField to the right of the Label, and a button to the right of the TextField.
- B
关注下方微信公众号,在线模考后查看
热门试题
- 已知: 下面哪些代码在横线处是合法的(
- A web bro
- public class&e
- Which expressi
- 已知: 下面哪些语句在横线处是合法的(
- 下面有关JVM内存,说法错误的是()。
- Given: 3
- 下列哪些项是泛型的优点?()
- 两个线程并发执行以下代码,假设a是全局变
- 1. interface&e
- 下载并安装JDK软件包,并尝试查看其中的
- Which change&en
- this()和super()只能位于构造
- for (int
- 如果不使用布局管理器,会出现哪些问题?(
- 表示键值对概念的接口是哪项?()Q
- public class&e
- public static void
- 1. class
- 关于try...catch...fina