网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
判断题
抽象类不能实现接口
A
对
B
错
参考答案
参考解析
解析:
暂无解析
更多 “判断题抽象类不能实现接口A 对B 错” 相关考题
考题
单选题为了使得System.out.println()输出对象引用的时候得到有意义的信息,我们应该覆盖Object中的哪个方法?()A
equalsB
hashCodeC
toStringD
notify
考题
单选题现有: 3. import java.util.*; 4. class ForInTest { 5.static List list=new ArrayList(); 6. 7.public static void main (String [] args) { 8.list. add("a"); list. add("b");list. add( "c"); 9. //insert code here 10. System.out.print (o); 11. } 12. } 哪一行插入到第9行将导致输出“abc"?()A
for (Iterator o : list.iterator(); o.hasNext (); )B
for (Iterator 0 : list)C
for (Object o : list.iterator())D
for (Object o : list)
考题
单选题无模式对话框的特点是什么?()A
是顶级对话框,不需要依附于框架B
在显示时,不会屏蔽用户向对话框所属的主框架键入的所有内容C
就是通用的对话框的简称D
在显示时,将屏蔽用户向对话框所属的主框架键入的所有内容
考题
单选题以下关于支持Java运行平台的叙述,哪项错误?()A
Java可在Solaris平台上运行B
Java可在Windows平台上运行C
Java语言与平台无关。Java程序的运行结果依赖于操作系统D
Java语言与平台无关。Java程序的运行结果与操作系统无关
考题
单选题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].
考题
多选题如何初始化数组?()A利用大括号直接创建数组和其中的元素;B利用new关键字创建一个数组;C数组不需要初始化,只要定义数组变量即可;D数组不需要初始化,只要定义数组变量,并为数组中的每个元素赋值即可;E定义数组变量,再分别初始化数组中的每个元素;
考题
单选题public class Employee{ private String name; public Employee(String name){ this.name = name; } public String getName(){ return name; } } public class Manager extends Employee{ public Manager(String name){ System.out.println(getName()); } } 执行语句new Manager(“smith”)后程序的输出是哪项?()A
smithB
nullC
编译错误D
name
考题
单选题现有: class Wrench2 { int size; public static void main(String [] args) { Wrench2 w=new Wrench2(); w.size=II; Wrench2 w2=go(w, w.size); System. out .print (w2. size); } static Wrench2 go(Wrench2 wr. int s) { S=12; return wr; } } 结果为()A
11B
12C
编译失败D
运行时异常被抛出
考题
单选题1.class SuperFo{ 2. SuperFo doStuff(int x){ 3.return new SuperFo() 4.} 5.} 6. 7.class Foo extends SuperFo{ 8.//insert code here 9.} 和四个声明: Foo doStuff(int x){return new Foo();} Foo doStuff(int x){return new SuperFoo();} SuperFoo doStuff(int x){return new foo();} SuperFoo doStuff(int y){return new SuperFoo();} 分别插入到第8行,有几个可以通过编译 ()A
1B
2C
3D
4E
5
考题
单选题现有: 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
考题
多选题建立Sochet类的服务器端需要哪些步骤?()A服务器端对任意指定的IP地址和端口号进行监听B监听端口,等待客户端的连接C建立一个服务器端对象,提供监听的端口号D当获得其它客户端的连接后,停止监听,创建一个Socket类,用于通讯E服务器端在此端口继续进行监听
考题
多选题下列有关main()方法的签名正确的是哪些?()Apublic static void main(String[] args){}Bpublic static void main(){}Cpublic static void main(String args[]){}Dpublic void static main(String[] args){}
考题
多选题以下关于Java HotSpot的描述,哪两项错误?()AJavaHotSpot是一种热编译技术,在编译Java源程序时会被使用BJava HotSpot是一种热编译技术,在运行Java代码时会被使用CJava HotSpot是一种热编译技术,它只对程序的部分字节码进行优化DJava HotSpot是一种热编译技术,它会对程序的全部字节码进行优化
考题
单选题现有: class Number{ public static void main(String [] aras) { try { System.out.print (Integer.parselnt ("forty")); } catch (RuntimeException r) { System.out.print ("runtime"); } catch (NumberFormatException e) { system..ut.print("number"); } } } 结果是什么?()A
numberB
runtimeC
forty numberD
编译失败
考题
单选题在Swing GUI编程中, setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE) 语句的作用是()A
当执行关闭窗口操作时,不做任何操作。B
当执行关闭窗口操作时,调用 WindowsListener对象并将隐藏JFrameC
当执行关闭窗口操作时,调用 WindowsListener 对象并隐藏和销毁JFrameD
当执行关闭窗口操作时,退出应用程序
考题
多选题一个简单的图形界面(带有一个标签、文本框)需要哪些弹性布局的约束?()A设置面板相对于文本框架的位置;B设置面板的大小;C设置文本框相对于标签的位置;D设置标签相对于面板的位置;E设置标签、文本框的大小;
考题
单选题class Ifs{ public static void main(String[] args){ boolean state=false; int i=1; if((++i1)(state=true)) i++; System.out.println(i); } } 结果是()A
5B
编译失败C
运行时异常被抛出D
3E
4
考题
单选题int x=0; int y=10; do{l3.y--; ++x; }while(x5); System.out.print(x+","+y); What is the result?()A
5,6B
5,5C
6,5D
6,6
考题
问答题Java中怎样清除对象?能否控制Java中垃圾回收的时间?
热门标签
最新试卷
![瑞牛题库 章节练习 历年真题 模拟试卷](http://assets.51tk.com/51_sidebar_right_index.jpg)