Difference between NSArray and NSMutableArray

g.revolution picture g.revolution · Aug 28, 2009 · Viewed 43.8k times · Source

What is the difference b/w NSArray and NSMutableArray?

Answer

jtbandes picture jtbandes · Aug 28, 2009

NSMutableArray (and all other classes with Mutable in the name) can be modified. So, if you create a plain NSArray, you cannot change its contents later (without recreating it). But if you create an NSMutableArray, you can change it — you'll notice it has methods like -addObject: and -insertObject:atIndex:.

See the documentation for details.