Introduction of Object Oriented Programming in Java
OOP stands for Object-Oriented Programming.. The popular object-oriented languages are Java, C#, PHP, Python, C++, etc.
The main aim of object-oriented programming is to implement real-world entities, for example, object, classes, abstraction, inheritance, polymorphism, etc. Object-Oriented Programming is a methodology or paradigm to design a program using classes and objects. It simplifies software development and maintenance by providing some concepts.
- Object - Any entity that has state and behaviour is known as an object.
- Class - Collection of objects is called class. It is a logical entity.
- Inheritance - When one object acquires all the properties and behaviours of a parent object, it is known as inheritance.
- Polymorphism - If one task is performed in different ways, it is known as polymorphism.
- Abstraction- Hiding internal details and showing functionality is known as abstraction.
- Encapsulation - Binding (or wrapping) code and data together into a single unit are known as encapsulation.