A. on line 2 B. on line 3 C. on line 6 D. on line 7
A. 编译通过 B. 编译错误 C. 运行异常 D. 以上都不对
A. Object a=new BaseWidget(); a.speak(); BaseWidget b=new TypeAWidget(); b.speak(); C. TypeAWidget c=new BaseWidget(); c.speak(); D. 以上都不对
A. line 3: public; line 8: private B. line 3: protected; line 8: private C. line 3: private; line 8: protected D. line 3: public; line 8: protected
A. 多态分为静态多态和动态多态 B. 静态多态主要由方法重载实现 C. 动态多态主要有方法覆盖实现 D. 动态多态在编译阶段绑定
A. 不能通过编译 B. 父类变量 C. 子类变量
A. interface B B. abstract interface B C. abstract interface B extends A1,A2 //A1、A2为已定义的接口
A. 1 B. 2 C. 3 D. 4
A. Shape shape=new Shape(); B. TwoDemension circle =new Circle (); C. Shape shape =new TwoDemension(); D. TwoDemension triangle =new Triangle ();
A. Constants con=new Constants(); B. Constants.MAX=100 C. int i=Constants.MAX-Constants.MIN D. Constants.MIN>0