Java - Online Test - Abstract class - javasearch.buggybread.com


Share

Search Java Test Questions


 223 test questions in repository.




Java - Test Questions on 'Abstract class' - 3 questions found


Which of the following is not true for abstract classes ?Core Java
Abstract Class is only meant to be sub classed and not supposed to be instantiated.
Abstract class handlers can be used to handle derived class objects.
We can't have an abstract class without abstract methods.
Abstract class has member elements.

  abstract class  abstract methods

If X implements Y and Y extends Z, Which of the following initialization is correct ?Core Java
X x = new Y();
X x = new Z();
Z z = new Y();
Z z = new X();

  interfaces

If class A implements X interface, and Class B implements Y interface, and X is the parent of Y, Which of the following initialization is correct ?Core Java
A a = new B();
Y y = new A();
X x = new B();
Y y = new A();

  interfaces   inheritance







comments powered by Disqus