当前分类: Java认证考试综合练习
问题:单选题以下关于异常捕获的原则中,错误的是()A RuntimeException 可以不被捕获,Java会自动处理运行期异常。B 先列出子类,后列出父类。C 先列出具体的异常类,后列出通用的异常类。D Exception类必须出现,而且必须作为catch块中第一个匹配的类。...
查看答案
问题:多选题以下关于分之语句的作用,描述正确的是()Aif后面只能带一条执行语句,如果你需要执行多条语句,则需要把它们放到话括号里面;Bswitch语句与if…else if…else语句在功能上是对等的,二者可以互换;Cswitch结构中需要加入break语句,否则不能做到在执行完一个case之后就调处switch结构;Dif…else if…else结构是一种特殊的多元选择结构,它与if…else结构虽然形式上类似,但彼此没有任何关系;Eif后面只能带一条执行语句,如果你需要执行多条语句,必须以函数的形式完...
问题:单选题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 ...
问题:单选题当动作监听器激发时,会调用什么函数?()A onActivated函数;B actionPerformed函数;C doAction函数;D checkActionOn函数;...
问题:以下哪个组件不支持动作监听器?()...
问题:单选题class DemoApp{ public static void main(String[] args){ int x = 5; int y = ++x + x++; S ystem.out.println(“y=”+y+”,x=”+x); } } 以上程序运行后的输出结果是哪项?()A y=10,x=5B y=11,x=6C y=12,x=7D y=11,x=7...
问题:问答题请说出 ArrayList, Vector,LinkedList的存储性能和特性。...
问题:问答题举例说明类和类之间的关系。...
问题:单选题String[] elements={"for","tea","too"}; String first=(elements.length0)?elements[0]null; What is the result?()A Compilation fails.B An exception is thrown at runtime.C The variable first is set to null.D The variable first is set to elements[0]....
问题:以下关于File对象的描述中,错误的是()...
问题:单选题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...
问题:以下算术运算符中错误的是() ...
问题:现有: class Test2 f public static void main (String [] ar...
问题:java关于异常处理机制的叙述哪些正确()。...
问题:单选题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...
问题:public class Pet{ private String name; public Pet(){ S...
问题:单选题如何设置按钮变灰?()A 通过按钮的setEnabled函数设置B 通过框架的setEnabled函数将按钮的字体颜色变灰C 通过框架的setEnabled函数设置D 通过按钮的setEnabled函数将字体颜色变灰...
问题:单选题现有如下五个声明: 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...
问题:什么是静态初始化器?它有什么特点?与构造方法有什么不同?...
问题:单选题在事件处理中,适配器的作用是什么?()A 避免实现不需要的函数接口B 跳过事件处理类,直接面对事件处理函数C 使得框架类可以同时兼作事件处理类D 提高事件处理的执行速度...