---
title: "What is meant by Encapsulation?"  
description: "What is meant by Encapsulation?"  
author: "Pushpendra Singh"  
published: 2010-10-25  
updated: 2020-09-23  
canonical: https://www.mindstick.com/interview/140/what-is-meant-by-encapsulation  
category: "oops"  
tags: ["oops"]  
reading_time: 2 minutes  

---

# What is meant by Encapsulation?

Encapsulation is one of the fundamental principles of object-oriented programming. \
• Encapsulation is a process of hiding all the internal details of an object from the outside world • Encapsulation is a protective barrier that prevents the code and data being randomly accessed by other code or by outside the class \
• Encapsulation gives us maintainability, flexibility and extensibility to our code. \
• Encapsulation makes implementation inaccessible to other parts of the program and protect from whatever actions might be taken outside the function or class. \
• Encapsulation provides a way to protect data from accidental corruption \
• Encapsulation hides information within an object \

## Answers

### Answer by Pushpendra Singh

Encapsulation is one of the fundamental principles of object-oriented programming. \
• Encapsulation is a process of hiding all the internal details of an object from the outside world • Encapsulation is a protective barrier that prevents the code and data being randomly accessed by other code or by outside the class \
• Encapsulation gives us maintainability, flexibility and extensibility to our code. \
• Encapsulation makes implementation inaccessible to other parts of the program and protect from whatever actions might be taken outside the function or class. \
• Encapsulation provides a way to protect data from accidental corruption \
• Encapsulation hides information within an object \

### Answer by Pushpendra Singh

• Encapsulation is a process of hiding all the internal details of an object from the outside world \
• Encapsulation is the ability to hide its data and methods from outside the world and only expose data and methods that are required \


---

Original Source: https://www.mindstick.com/interview/140/what-is-meant-by-encapsulation

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
