问题:判断题在创建了JFrame对象之后,应当调用对象的pack函数,这个函数使框架变成它合适的大小。A 对B 错
查看答案
问题:单选题在Struts框架中如果要使用Validation作验证的话,需要使用以下哪个Form()。A ActionFormB ValidatorActionFormC ValidatorFormD DynaValidatorActionForm
问题:单选题Which keyword can protect a class in a package from accessibility by the classes outside the package()。A privateB protectedC finalD don’t use any keyword at all (make it default)
问题:单选题public class Pet{ private String name; public Pet(){ System.out.print(1); } public Pet(String name){ System.out.print(2); } } public class Dog extends Pet{ public Dog(){ System.out.print(4); } public Dog(String name){ super(name); System.out.print(3); } } 执行new Dog(“棕熊”);后程序输出是哪项?()A33B13C23D123
问题:单选题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 = 44C z = 45D z = 46
问题:单选题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 Anexceptionisthrownatruntime.D Compilationfailsbecauseofanerroratline12.E Compilationfailsbecauseofanerroratline19.
问题:单选题现有: class Bird { void talk() { System.out.print("chirp "); } } class Parrot2 extends Bird { protected void talk() { System.out.print("hello "); public static void main(String [] args) { Bird [] birds = {new Bird(), new Parrot2 () }; for( Bird b : birds) b.talk () ; } } 结果是什么 ?()Achirp chirpBhello helloCchirp helloD 编译错误
问题:问答题如何引用包中的某个类?如何引用整个包?如果编写JavaApplet程序时想把整个java.applet包都加载,则应该怎么做?
问题:单选题以下哪个组件不支持动作监听器?()A 文本框B 下拉框C 按钮D 列表框
问题:单选题关于弹性布局的特点,以下描述中错误的是()A 他的特点在于2通过约束来限定组件和容器之间,组件和组件之间的位置关系B 由于约束可以随意添加,因此用弹性布局可以实现普通布局管理器无法实现的复杂布局C 弹性布局是冲JDK 1.4版才加入的一种非常灵活的布局管理器D 弹性布局对于简单和复杂的布局的使用都非常简便
问题:多选题用JBuilder建立图形界面程序的步骤是()A创建一个JBuilder工程B在工程中创建一个应用程序C创建一个主框架窗口D为应用程序指定可以运行的操作系统和硬件E编译、连接应用程序,选择适合操作系统程序来运行
问题:单选题当动作监听器激发时,会调用什么函数?()A onActivated函数;B actionPerformed函数;C doAction函数;D checkActionOn函数;
问题:单选题class Number { public static void main(String [] args) { try { System.out.print(Integer.parseInt("forty ")); } catch (RuntimeException r) { System.out.print("runtime "); } catch (NumberFormatException e) { System.out.print("number "); } } } 结果是什么?()A fortyB numberC runtimeD 编译失败
问题:单选题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.print("r"); } } } 和: 当代码被编译并照此运行时产生 "before" 的输出, 当下列内容插入到代码第8行时产生"after"输出 if (x 〉 3 && x 〈 7) Thread.yield(); 对比“before”的输出结果和“after”的输出结果,下面哪一项是正确的?()A 输出字符的总数可能改变。B 当添加额外的代码时,编译将失败。C 在“after”输出结果中,字符“m”较早出现的可能性较小。D 在“after”输出结果中,字符“m”较早出现的可能性较大。
问题:单选题public class Demo{ public static void main(String[] args){ List al = new ArrayList(); al.add(“1”); al.add(“2”); al.add(“2”); al.add(“3”); System.out.println(al); } } 上述程序执行后的输出是哪项?()A[1,2,3]B[1,2,2,3]C[1,2,3,3]D[2,1,3,2]
问题:单选题下列类Account的构造方法中,声明正确的是?()A Account (String name)()B Account (String name)C Account (name)()D NewAccount (String name)()
问题:单选题现有: class Test2 f public static void main (String [] args) { boolean X= true; boolean y=false; short Z=20; if((x==true) && (y=true)) z++; if((y==true) || (++z==22)) z++; System. out .println( "z="+z); } 结果是什么?()A Z=21B Z=22C Z=23D Z= 24
问题:单选题以下算术运算符中错误的是()A除法运算符:“/”B余树运算符::“%”C加法运算符:“+”D指数运算符:“^” 单项
问题:单选题以下关于File对象的描述中,错误的是()A File对象是不可变的,一旦创建,它所指向的文件就不能改变;B File对象不一定要指向实际存在的文件或文件夹;C File类具有强大的文件和文件夹操作能力;D File对象的功能仅限于关于文本文件;
问题:单选题现有如下五个声明: 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