Features of OOPs (Object Oriented Paradigms in JAVA)

Features of OOPs (Object Oriented Paradigms in JAVA)
Features of OOPs (Object Oriented Paradigms in JAVA)

What is OOPs ?

OOPs stands for Object Oriented Paradigms, some time people also call it as Object Oriented Programming which is quit wrong.

Features of OOPs

  1. Classes and Objects
  2. Abstraction
  3. Encapsulation
  4. Inheritance
  5. Polymorphism
  6. Message Passing

Let me explain some of the terms given above :-

Classes and Objects

A Class is a user defined data type which can have data members (attributes) and member methods (behavior).

e.g:- Human can be treated as a Class and following will be it’s attributes and behaviors

Attributes Behaviors
2 eyes see()
2 legs walk()
2 ears hear()
1 mouth talk()
1 nose smell()

Class provides a template for creating objects.

Objects is a variable of class type data type. It is also known as instance of a class or run time entity.

Abstraction

Abstraction is a process of hiding background details and showing required / necessary things.

in JAVA it can be done by using access specifier. Some examples of Access Specifiers are :-

  1. private
  2. protected
  3. public
  4. default

Encapsulation

Encapsulation is a process of wrapping up of data members and data methods in a single unit (class).

Inheritance

Inheritance is a process of acquiring the attributes from previously defined class in newly created class.

Exiting class is known as parent class and newly created class is known as child class.

Polymorphism

Polymorphism is a greek word which consist of two words Poly and Morphism where poly means many and morphism means shape of forms.

It is divided into two parts as given below :-

Compile Time

(Early Binding or Static Binding)

Run Time

(Late Binding or Dynamic Binding)

Method Overloading Method Overriding
Constructor Overloading Virtual Method Invocation
Inheritance

Message Passing

syntax: objectname.method_name(arguments)

here method_name is message and arguments is data

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

erbhaveshkumar123

I am a Person who Loves to Do Innovative things.

You may also like...

Follow

Get the latest posts delivered to your mailbox: