Object oriented programming provide a great flexibility, reusability, modularity and security to an application.. 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 - Abstraction provides a way to hide the less essential properties so as to reduce complexity and increase efficiency.
- Encapsulation - 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 - 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 - 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 - 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.
- Objects - 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 - Methods are the operations that an object can perform. Methods define the behavior of an object.
Post a Comment