Why am I getting a NullPointerException here?
<pre><code>Long n = null;
for (Long price : new Long[]{null, 2L, 10L}) {          
n = (n != null) ? 0L : price;   
}
</code></pre>

<p>I'm stumped, why am I getting a NPE when I execute this code ? 
Seems to be just a simple assignment of n = price where price is null.
Don't worry about what it means, it makes no sense. </p>
