---
title: "Encapsulation in Oop's"  
description: "Encapsulation in Oop's"  
author: "Anonymous User"  
published: 2018-06-11  
updated: 2018-06-11  
canonical: https://www.mindstick.com/forum/34505/encapsulation-in-oop-s  
category: "oops"  
tags: ["java", "oops", "python", "computer science"]  
reading_time: 1 minute  

---

# Encapsulation in Oop's

What is meaning of [Encapsulation](https://www.mindstick.com/articles/12229/encapsulation-and-access-specifier) ? Please described in details of [Oop](https://www.mindstick.com/forum/160066/what-is-oop-in-javascript)'s too.

## Replies

### Reply by Prakash nidhi Verma

## Encapsulation :

This is the one of the main principle from oop's concept.it's hiding the the data and keep synonymous. It is internal representation of an object can't be seen from outside of the object definition.

__(underscore) : representation for hiding data.

```
Private date_A
instance_name._classname_A 
```

Special methods use by Encapsulation :

1- Getters : gets()

2- Setters : set()

in C++ its called Public key ,in Java Private key ,in Python Protected Keywords.

Pseudo code:

```
Class Encapsulation (object):    def__init__(self,a,b,c):
   self.public=a;
   self.protected=b;
   self.private=c;

```

Happy Coding :)


---

Original Source: https://www.mindstick.com/forum/34505/encapsulation-in-oop-s

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
