填空题

在面向对象方法中,类之间共享属性和操作的机制称为______。

【参考答案】

继承
<上一题 目录 下一题>
热门 试题

单项选择题
下面程序段的输出结果是( )。 publicclassTest publicstaticvoidmain(Stringargs[]) intx,y; x=(int)Math.sqrt(5) 2+(int)Math.random()*5 2; Y=(int)Math.sqrt(3) 2+(int)Math.random()*3 2; if(x>y) System.out.println9 x>y ); elseif(x==y) System.out.println( x=y ); else System.out.println( x<y );
A.x>y
B.x=y
C.x<y
D.编译错误
单项选择题
下列程序的功能是在监控台上每隔一秒钟显示一个字符串 Hello! ,能够填写在程序中下划线位置,使程序完整并能正确运行的语句是 publicclassTestimplementsRunnable publicstaticvoidmain(Stringargs[]) Testt=newTest(); Threadtt=newThread(t); tt.start(); publicvoidrun() for(;;) try catchL______e) System.out.println( Hello );
相关试题
  • FileChannel类为磁盘文件映射入_____...
  • 希望编写好的Java程序代码,应遵守命名规则...
  • 如果一个JavaApple源程序文件只定义有一个...
  • 在传递给实现了java.awt.event.MouseMot...
  • 下面OneFrame类创建了一个名为This is aF...