---
title: "What is a information hiding in object oriented programming"  
description: "What is a information hiding in object oriented programming"  
author: "Barbara Jones"  
published: 2016-11-08  
updated: 2020-09-23  
canonical: https://www.mindstick.com/interview/23097/what-is-a-information-hiding-in-object-oriented-programming  
category: "oops"  
tags: ["oop"]  
reading_time: 2 minutes  

---

# What is a information hiding in object oriented programming

In our everyday life, many of us oftentimes try to hide information from other people. In many situations, the information hiding is an essential part of our life. For example, when we go grocery shopping, do we allow the store clerk to withdraw money from our wallet? The wallet (which is an object in object-oriented terms) hides money (which is the information or attribute/field of an object) from outsiders. A wallet may provide a method called “pull out X dollars” that, when executed by an outside object, results in handing over X dollars to the caller without disclosing how much money is in it. This is called **information hiding** in object-oriented programming.

## Answers

### Answer by Barbara Jones

In our everyday life, many of us oftentimes try to hide information from other people. In many situations, the information hiding is an essential part of our life. For example, when we go grocery shopping, do we allow the store clerk to withdraw money from our wallet? The wallet (which is an object in object-oriented terms) hides money (which is the information or attribute/field of an object) from outsiders. A wallet may provide a method called “pull out X dollars” that, when executed by an outside object, results in handing over X dollars to the caller without disclosing how much money is in it. This is called **information hiding** in object-oriented programming.


---

Original Source: https://www.mindstick.com/interview/23097/what-is-a-information-hiding-in-object-oriented-programming

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
