Paper Tayyari

Lecture 9: Abstract Classes and Interfaces

MCQs, short and long questions from lecture 9.Lecture 9 ki MCQs, short aur long sawal.

7 MCQs · 3 short · 3 long questions · 7 MCQs from past papers7 MCQs · 3 short · 3 long sawal · 7 MCQs past papers se

Start mock testMock test shuru karein
DoneHal kiye 0/7
– correctsahi
1.
★ Midterm Fall 2008

An abstract class --------------- instantiated.

  1. ACan't be
  2. BCan be
  3. CMust
  4. DNone of these

Objects cannot be created from an abstract class.

2.
★ Midterm Spring 2006

In Java an abstract class cannot be sub-classed

  1. ATrue
  2. BFalse

Abstract classes are meant to be subclassed.

3.
★ Midterm past paper

An instance of abstract class cannot be created.

  1. ATRUE
  2. BFALSE

Abstract classes cannot be instantiated.

4.
★ Midterm past paper

Which of the following is called ' pure abstract class ' ?

  1. AConcrete class
  2. BWrapper class
  3. CInterface
  4. DAbstract class with no abstract method

All methods of an interface are abstract, so it acts as a pure abstract class.

5.
★ Midterm past paper

Which of the following is true about abstract class?

  1. AAn abstract class must have all methods declared as abstract methods.
  2. BA class must have at least one abstract method to be an abstract class.
  3. CA class without any abstract method can be declared as abstract class.
  4. DAn instance of abstract class can be created.

A class may be declared abstract even if it has no abstract methods.

6.
★ Midterm past paper

Which of the following feature provide facility for multiple inheritances:-

  1. AAdapter Classes
  2. BWrapper Classes
  3. CInterface
  4. DCollection

A class can implement many interfaces, which gives the effect of multiple inheritance.

7.
★ Midterm past paper

An abstract class:

  1. ACan be instantiated
  2. BCan’t be instantiated
  3. CMust be instantiated
  4. DNone of these

Objects of an abstract class cannot be created with new.