Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the difference between underscore and self (i.e self.xx and _xx) ?



What is the difference between underscore and self (i.e self.xx and _xx) ?..

Answer / Son Dev Jatav

In Objective-C, 'self' refers to the current object instance. When using 'self', you access instance variables with a dot notation like 'self.variable'. An underscore '_' is often used as an ivar (instance variable) prefix in Objective-C classes for consistency with C coding style. However, it has no special meaning in Objective-C and can be replaced with self or any other valid name.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Objective-C Interview Questions

Is objective c and c the same?

1 Answers  


What is extern objective c?

1 Answers  


What is a category extension?

1 Answers  


Is struct a class?

1 Answers  


Is method and function same?

1 Answers  


What is gcd? What are its advantages over nsthread?

1 Answers  


Explain the types of protocol?

1 Answers  


What is the primary use of the category in the objective-c?

1 Answers  


What are the rules of variable?

1 Answers  


Can we implement dealloc in arc? If yes, what is the need to do that?

1 Answers  


What are kvc and kvo? Provide an example.

1 Answers  


What is autoclosure?

1 Answers  


Categories