---
title: "How to access the encapsulated data in objective-c ?"  
description: "How to access the encapsulated data in objective-c ?"  
author: "Anonymous User"  
published: 2015-08-20  
updated: 2020-09-18  
canonical: https://www.mindstick.com/interview/22781/how-to-access-the-encapsulated-data-in-objective-c  
category: "iphone"  
tags: ["iphone", "ios", "objective c"]  
reading_time: 1 minute  

---

# How to access the encapsulated data in objective-c ?

(a)Data encapsulation encourages the use of methods to +get and set the values of instance variables in a class.

(b)But the developer to want to directly access an instance variable without having to go through an accessor method.

(c) In objective-c syntax for an instance variable is as follow [class instance variable name]

## Answers

### Answer by Anonymous User

(a)Data encapsulation encourages the use of methods to +get and set the values of instance variables in a class.

(b)But the developer to want to directly access an instance variable without having to go through an accessor method.

(c) In objective-c syntax for an instance variable is as follow [class instance variable name]


---

Original Source: https://www.mindstick.com/interview/22781/how-to-access-the-encapsulated-data-in-objective-c

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
