OOP (Object Oriented Programming)

Java supports OOPs. The basic concepts of OOPs are discussed here. These are just for reference.

Inheritance

It is a concept by which the child class inherits the properties of the parent class i.e. parent has some predefined behavior and properties which are by default available in the child class.

Multiple inheritance

Java does not support multiple inheritance as it leads to ambiguity due to the Diamond problem.

Polymorphism

Polymorphism allows objects to be represented in different forms i.e. the objects can have different behavior depending on the implementation.

Abstraction

Abstraction is "the process of identifying common patterns that have systematic variations; an abstraction represents the common pattern and provides a means for specifying which variation to use" (Richard Gabriel).

An abstract class is a parent class that allows inheritance but can never be instantiated. Abstract classes contain one or more abstract methods that do not have implementation. Abstract classes allow specialization of inherited classes.

Encapsulation

This is the concept by which the data is held together and the implementation is hidden. This is acheived in Java through class.

Back to Technicals

1