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


Share

Search Java Test Questions


 223 test questions in repository.




Java - Test Questions on 'Abstract' - 7 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

Which of the following can be declared abstract ?Core Java
static methods
instance methods
static variable
instance variables

  abstract

Which of the following is false about main method ?Core Java
It should be declared public and static
it should have only 1 argument of type String array
We can override main method
We can overload main method

  java  main method

Which of the following Java feature promotes access protection or Hiding ?Core Java
Inheritance
Encapsulation
Abstraction
Composition

  java  java concepts  java features  oops concepts  oops features  access protection  information hiding

Which of the following Java feature promotes Code Re usability ?Core Java
Abstraction
Encapsulation
Inheritance
Polymorphism

  java  java concepts  java features  code reusability

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