Programming - Abstract Classes
You Are Here :: Home > JAVA > Abstract Classes - General Questions
1.
In Java programme we have to use how many types of classes?
A.
Two types
B.
Three types
C.
Four types
D.
Five types
Answer: Option A
Explanation:
Java Supports two types of Packages.1)Built In Package 2)User-Defined Package.
2.
An abstract class is one which is containing ______________________.
A.
some defined methods and undefined methods
B.
only defined methods
C.
only undefined methods
D.
none
Answer: Option A
Explanation:
java.lang contains essential classes that represent primitive data types as well as more complex classes, including numerics,strings,objects,compiler,runt time,security and threads.This is the only package that automatically imported.
3.
_________ can be defined as the process of hiding the unwanted details and exposing only the essential features of a particular object or concept.
A.
Abstraction
B.
Encapsulation
C.
Inheritance
D.
Polymorphism
Answer: Option A
Explanation:
4.
An _______________ class is something which is incomplete and you can not create instance of abstract class.
A.
Abstract
B.
Static
C.
Non-Static
D.
Explicit
Answer: Option A
Explanation:
An abstract class is something which is incomplete and you can not create instance of abstract class.
5.
______________ methods are those which need to be implemented in subclass
A.
Abstract
B.
Static
C.
Non-Static
D.
Explicit
Answer: Option A
Explanation:
Abstract methods are those which need to be implemented in subclass
6.
Abstract methods are only defined in _______________ class but with no body.
A.
Super
B.
Child
C.
Base
D.
Explicit
Answer: Option A
Explanation:
Abstract methods are only defined in superclass / parent class but with no body.
next »