当前分类: Java认证考试综合练习
问题:以下关于File对象的描述中,错误的是()...
查看答案
问题:单选题package test; class Target{ public String name="hello"; } What can directly access and change the value of the variable name?()A any classB only the Target classC any class in the test packageD any class that extends Target...
问题:现有: class Test2 f public static void main (String [] ar...
问题:public class Pet{ private String name; public Pet(){ S...
问题:现有: class Tree { private static String tree = "tree "; St...
问题:以下算术运算符中错误的是() ...
问题:单选题下列哪项不是有效的标识符?()A userNameB 2testC $changeD _password...
问题:class Guy { String greet() { return "hi "; } } class Cowboy...
问题:单选题现有: class TestMain { static int x = 2; static { x = 4; } static public void main(String[] args) { int y = x + 1; System.out.println(y); } } 和命令行: java TestMain 结果为:()A 3B 5C 编译失败D 运行时异常被抛出...
问题:单选题现有: class Foo { public static void main (String [] args) { int x=O; int y=4; for (int z=0; z1++y10) y++; } System. out .println (y); } } 结果是什么?()A 7B 8C 10D 12...
问题:JSP内置对象中,()对象是 代表应用程序上下文,它允许JSP页面与包括在同一应用程序中的任何Web组件共享信息 ,而(...
问题:单选题当动作监听器激发时,会调用什么函数?()A onActivated函数;B actionPerformed函数;C doAction函数;D checkActionOn函数;...
问题:单选题现有如下五个声明: 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 是最灵活,最复杂的布局之一...
问题:为什么用面板来对组件进行排列?()...
问题:单选题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 ...
问题:单选题public class TestApp{ public static void main(String[] args){ try{ int i = 0; int j = 1 / i; System.out.println(“1”); }catch(Exception e){ System.out.print(“3”); }finally{ System.out.print(“4”); } ...
问题:以下哪个组件不支持动作监听器?()...
问题:单选题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...
问题:单选题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...