Monday, 1 October 2012

OOPS concepts in java

OOPS concepts in java

Java is a pure object oriented programming language. It is based on the concept of object. Java implements all the features of object oriented programming like

  • Abstraction
  • Encapsulation
  • Polymorphism
  • Inheritance
  • Class
  • Objects
  • Methods

Object oriented programming provide a great flexibility, reusability, modularity and security to an application.

Data hiding is a very powerful feature. It provides security to various sensitive methods and variables.

Abstraction provides a way to hide the less essential properties so as to reduce complexity and increase efficiency.

Encapsulation is an information hiding and securing mechanism. It helps in restricting the access of data from the outside entities it means only the methods in a class can access its member variables. Encapsulation reduces the system complexity and increases robustness.

Polymorphism is a way to have more than one form of a method. In polymorphism, we use the method overloading and method overriding techniques.

Inheritance is used to reduce the code and reuse the already available code. Here we extend a base class to a derived class. The derived class then inherits the properties of its base class.

Class is a very essential entity in java. Every program in java has a class. Class is like a blueprint of an object. A class contains member variables and methods.

Object is soul of object oriented programming. An object is an instance of its class. Object is used to access the methods and variables in a class.

Methods are the operations that an object can perform. Methods define the behavior of an object.

All of the above object oriented programming concepts are widely used when we write java codes. OOPS concepts are one of the reason for the power and success of java programming language.

No comments:

Post a Comment