728x90 AdSpace

Saturday, 17 June 2017

Object-Oriented Programming Concepts

Object-Oriented Programming (OOPs) Concepts

  1. Object
  2. Class
  3. Inheritance
  4. Polymorphism
  5. Abstraction
  6. Encapsulation

Object

Any entity that has state and behavior is known as an object. For example: table, keyboard, car etc. It can be physical and logical.

Class

A class is a blueprint or prototype from which objects are created. Class is a collection of objects is called class. It is a logical entity.

Inheritance

When one object acquires all the properties and behaviours of parent object i.e. known as inheritance. It provides code re-usability. It is used to achieve runtime polymorphism.

Polymorphism

When one task is performed by different ways i.e. known as polymorphism. In java, we use method overloading and method overriding to achieve polymorphism.

For example: to draw something e.g. shape or rectangle etc.

Abstraction

Hiding internal details and showing functionality is known as abstraction. For example: Driver don't wanna know how car internally works.

In java, we use abstract class and interface to achieve abstraction.

Encapsulation

Binding (or wrapping) code and data together into a single unit is known as encapsulation.


Annamalai Thangaraj

Annamalai is working as Technical Lead in Leading Telecom company with 5+ years experience in Identity and Access Management , Telecom and Networks, BigData, Java, Spring, Struts, Hibernate, AngularJS, and Enterprise Web Application Development.

Website: Java Tutorials Corner

Shop and help us

Flipkart Offer Snapdeal offer Amazon.in offer Amazon.com offer
  • Blogger Comments
  • Facebook Comments
  • Disqus Comments

0 comments:

Post a Comment

Item Reviewed: Object-Oriented Programming Concepts Rating: 5 Reviewed By: Annamalai Thangaraj