Explain when to use nsarray and nsmutablearray. Which one is faster and threadsafe?



Explain when to use nsarray and nsmutablearray. Which one is faster and threadsafe?..

Answer / Babalu Gautam

NSArray is used when data modification is not required, as it is read-only. NSmutableArray is used for modifying the content of an array. Regarding speed, NSArray is generally faster because it's immutable, but NSmutableArray allows for dynamic changes to the data. Both are not threadsafe; they do not provide concurrent access safety.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Objective-C Interview Questions

How to call methods in objective c?

1 Answers  


Why do we require class extension?

1 Answers  


Explain the way messaging works in objective-c?

1 Answers  


What is dot notation?

1 Answers  


What is .h and .m file in xcode?

1 Answers  


Is method and function same?

1 Answers  


Does objective c have function overloading?

1 Answers  


What are the advantages of swift over objective c?

1 Answers  


Explain the difference between #import and #include in objective-c?

1 Answers  


What is the difference between string and nsstring?

1 Answers  


What is objective c programming used for?

1 Answers  


What number distinctive annotations is accessible in objective-c?

1 Answers  


Categories