NSArray difference between firstObject and objectAtIndex:0
<p>In the following example array objectAtIndex:0 crashes but firstObject resulting a nil value. Why this happening?</p>

<pre><code>NSArray *array = [NSArray new];
id obj1 = [array firstObject]; // this is giving nil value
id obj2 = [array objectAtIndex:0]; // this line crashes
</code></pre>