OOPS and Core Java Interview Question and Answers
9. | What is an abstract class? |
---|---|
Abstract class defines an abstract concept which cannot be instantiated and comparing to interface it can have some implementation while interface cannot. | |
10. | What is encapsulation? |
---|---|
The wrapping of data and functions into a single unit (called class) is known as encapsulation. Access to the code and data inside the wrapper is tightly controlled through a well defined interface. | |
11. | What is inheritance? |
---|---|
Inheritance is the process by which objects of one class acquire the properties of objects of another class. It supports the concept of hierarchical classification. | |
12. | What is polymorphism? |
---|---|
|
|