- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What are basic Object oriented programming concepts?
The basic Object-oriented programming concepts are:
Inheritance
Inheritance can be defined as the process where one (parent/super) class acquires the properties (methods and fields) of another (child/sub). With the use of inheritance, the information is made manageable in a hierarchical order.
Polymorphism
Polymorphism is the ability of an object to perform different actions (or, exhibit different behaviors) based on the context.
Abstraction
Abstraction is a process of hiding the implementation details from the user, only the functionality will be provided to the user. In other words, the user will have the information on what the object does instead of how it does it.
In Java, abstraction is achieved using Abstract classes and interfaces.
Encapsulation
Encapsulation in Java is a mechanism for wrapping the data (variables) and code acting on the data (methods) together as a single unit. In encapsulation, the variables of a class will be hidden from other classes and can be accessed only through the methods of their current class. Therefore, it is also known as data hiding. To achieve encapsulation in Java −
- Declare the variables of a class as private.
- Provide public setter and getter methods to modify and view the variables values.
- Related Articles
- Basic Concepts of Object Oriented Programming using C++
- What is object-oriented programming (OOP)?
- What is the difference between Object oriented programming and Object based programming?
- Explain briefly the Object oriented concepts in Python?
- Object Oriented Programming in Python?
- Object-Oriented Programming in R
- What is an Object Oriented Programming in JavaScript?
- Object Oriented language v/s Procedure oriented programming language.
- What are the basic concepts of Python?
- Python Object-oriented and Functional Programming
- What is Data Hiding in Python Object Oriented Programming?
- What are the basic concepts of data mining?
- Differences between Procedural and Object Oriented Programming
- Object Oriented language v/s Object based programming language.
- How to start object-oriented programming in C++?
