当前分类: Java认证考试综合练习
问题:单选题现有 public class Demo{ public static void main (String[] args){ List al=new ArrayList(); a1.add("l"); a1.add("2"); a1.add("2"); a1.add("3"); System.out.println (al); } } 上述程序执行后的输出是哪项?()A [1,2,3]B [1,2,3,3]C ...
查看答案
问题:单选题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...
问题:现有: 1. class Book { 2. private final void read() { Syste...
问题:单选题引用类型的数据字段的缺省值为()A 0.0B 0C nullD false...
问题:单选题关于弹性布局的特点,以下描述中错误的是()A 他的特点在于2通过约束来限定组件和容器之间,组件和组件之间的位置关系B 由于约束可以随意添加,因此用弹性布局可以实现普通布局管理器无法实现的复杂布局C 弹性布局是冲JDK 1.4版才加入的一种非常灵活的布局管理器D 弹性布局对于简单和复杂的布局的使用都非常简便...
问题:以下算术运算符中错误的是() ...
问题:单选题以下哪个组件不支持动作监听器?()A 文本框B 下拉框C 按钮D 列表框...
问题:public class Pet{ private String name; public Pet(){ S...
问题:单选题当动作监听器激发时,会调用什么函数?()A onActivated函数;B actionPerformed函数;C doAction函数;D checkActionOn函数;...
问题:以下关于File对象的描述中,错误的是()...
问题:现有: class Test2 f public static void main (String [] ar...
问题:单选题下面哪种布局方式只影响控件的高度,而不影响宽度()A BorderLayout的WEST和EASTB BorderLayout的NORTH和SOUTHC GridLayoutD FlowLayout...
问题:public class Employee{ private String name; public Emplo...
问题:单选题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...
问题:下列哪些方法是在编译时刻绑定的?() ...
问题:单选题现有: class Cat { Cat (int c) {System.out.print {"cat"+c+" "); } } class SubCat extends Cat { SubCat (int c){super (5); System.out.print ("cable");} SubCat() { this (4); } public static void main (String [] arg...
问题:单选题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...
问题:单选题11.rbo = new ReallyBigObject(); 12.//more code here 13.rbo = null; 14./*insert code here*/ Which statement should be placed at line 14 to suggest that the virtual machine expend effort toward recycling the memory used by the objectrbo?()A System.gc();B...
问题:单选题设 x = 1 ,y = 2 , z = 3, 则表达式 y+=z--/++x 的值是()A 3B 3.5C 4D 5...