When will you use nsarray and nsmutablearray?



When will you use nsarray and nsmutablearray?..

Answer / Chandra Bahadur

You'll use NSArray when you need an immutable array, like storing a constant set of values or returning a result from a method. Use NSMutableArray when you need to modify the contents of an array during runtime, such as adding new elements, removing existing ones, or changing their order.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Objective-C Interview Questions

What is gcd? What are its advantages over nsthread?

1 Answers  


Why create a custom view?

1 Answers  


What are objective- c blocks?

1 Answers  


What is objective point of view?

1 Answers  


What are the three main types of property?

1 Answers  


How dispatch_once runs only once?

1 Answers  


When might you use a cfarray/dictionary instead of a nsarray/dictionary?

1 Answers  


Explain what are the attributes of category?

1 Answers  


What is delegation protocol?

1 Answers  


How to call objective c function in swift?

1 Answers  


Mention whether nsobject is a parent class or derived class.

1 Answers  


What is the difference between class and category?

1 Answers  


Categories