当前分类: Java认证考试综合练习
问题:单选题以下哪个组件不支持动作监听器?()A 文本框B 下拉框C 按钮D 列表框...
查看答案
问题:单选题当动作监听器激发时,会调用什么函数?()A onActivated函数;B actionPerformed函数;C doAction函数;D checkActionOn函数;...
问题:现有: class Test2 f public static void main (String [] ar...
问题:单选题class Order3 implements Runnable { public static void main(String [] args) { new Thread(new Order3()).start(); for(int x = 0; x 〈 10; x++) System.out.print("m"); } public void run() { for(int x = 0; x 〈 10; x++) { //insert code here System.out.p...
问题:单选题在Swing GUI编程中,setDefaultCloseOperation(JFrame.EXIT_ON_ CLOSE)语句的作用是:()A 当执行关闭窗口操作时,不做任何操作。B 当执行关闭窗口操作时,调用WindowsListener对象并将隐藏JFrameC 当执行关闭窗口操作时,退出应用程序D 当执行关闭窗口操作时,调用WincowsListener对象并隐藏和销毁Jframe...
问题:单选题public void testIfA(){ if(testIfB("True")){ System.out.println("True"); }else{ System.out.println("Nottrue"); } } public Boolean testIfB(Stringstr){ return Boolean.valueOf(str); } What is the result when method testIfA is invoked?()A TrueB NottrueC Ane...
问题:单选题如何在面板中添加组件?()A 用框架对象的add函数将组件加到特定的面板中;B 将组件作为面板对象的一个成员变量;C 用组件的add函数添加;D 用面板对象的add好书添加;...
问题:单选题class Wrench { public static void main(String [] args) { Wrench w = new Wrench(); Wrench w2 = new Wrench(); w2 = go(w,w2); System.out.print(w2 == w); } static Wrench go(Wrench wr1, Wrench wr2) { Wrench wr3 = wr1; wr1 = wr2; wr2 = wr3; return wr...
问题:public class Pet{ private String name; public Pet(){ S...
问题:Java的一个重要特点是结构中立性,这种结构中立性表现在() ...
问题:类 Student 中字段mark的缺省值是哪项?() Class Student{ String name; ...
问题:以下关于GUI事件处理模型的叙述,哪两项是错误的()? ...
问题:以下算术运算符中错误的是() ...
问题:多选题关于try...catch...finally结构,描述正确的是哪项?()A可以有多个catchB只能有一个catchC可以没有catchDfinally必须有...
问题:单选题class Test4 { public static void main(String [] args) { boolean x = true; boolean y = false; short z = 42; if((z++ = = 42) (y = true)) z++; if((x = false) || (++z = = 45)) z++; System.out.println("z = " + z); } } 结果为:()A z = 42B z ...
问题:单选题现有如下五个声明: Linel: int a_really_really_really_long_variable_name=5 ; Line2: int _hi=6; Line3: int big=Integer. getlnteger("7”); Line4:int $dollars=8; line5: int %opercent=9; 哪行无法通过编译?()A Line1B Line3C Line4D Line5...
问题:以下关于File对象的描述中,错误的是()...
问题:单选题对小程序的安全限制的描述中,错误的是()A 小程序不能导入其它库或者以其它语言写的代码;B 小程序不能读出或写入客户机的文件,它只能读出以网址形式给出的文件;C 小程序不能与除了提供它的服务器以外的任何主机建立网络连接;D 小程序只能执行客户机上的操作系统所提供的程序;...
问题:单选题以下关于GUI容器缺省布局管理器的叙述,哪项正确?()A JPanel容器的缺省布局管理器是FlowLayoutB JPanel容器的缺省布局管理器是BorderLayoutC JFrame容器的缺省布局管理器是FlowLayoutD JFrame容器的缺省布局管理器是GridLayout...
问题:多选题如何建立标签面板?()A创建一个标签页面板对象B用addTab函数将子面板一个个加到标签页中C设置标签页数D设置各子面板之间的重叠覆盖关系E设置首先显示的子面板...