单项选择题

下面程序中需要对Employee的对象进行存储,请在下画线处填入正确选项______。
class Emloyee implements______
…

A.Comparable
B.Serializable
C.Cloneable
D.DataInput
<上一题 目录 下一题>
热门 试题

单项选择题
阅读下面程序 class Test implements Runnable public static void main (String[] args) Test t=new Test(); t.start(); public void run() 下列关于上述程序的叙述正确的是______。
A.程序不能通过编译,因为start()方法在Test类中没有定义
B.程序编译通过,但运行时出错,提示start()方法没有定义
C.程序不能通过编译,因为run()方法没有定义方法体
D.程序编译通过,且运行正常
单项选择题
请阅读下面程序 public class ThreadTest public static void inain(String args[]) throws Exception int i=0; Hello t=new Hello(); ______; while(true) System.out.printIn ( Good Morning +j++); if(i==2&&LisAlive()) System.out.printIn( Main waiting for Hello! ); T.join(); 等待t运行结束 if(i==5)break; class Hello extends Thread int i ; public void run() while(true) System.out.printIn( Hello +i++); if(i==5) break; 为使该程序正确执行,下画线处的语句应是______。
A.sleep()
B.yield()
C.interrupt()
D.start()
相关试题
  • 阅读下面程序 1 public class Try ex...
  • 请阅读下面程序 public class ThreadTes...
  • 请阅读下面程序 public class ThreadTes...
  • 下列叙述中,正确的是______。
  • 阅读下面程序 class Test implements R...