posted 11 years ago
The array variable arr is pointing to null in line 5 and in the next line you are trying to "dereference" the null pointer. It is this line which is causing the exception.
In case you have not yet gone through what a null pointer is and what a NullPointerException is , do search this forum, there are plenty of posts on the same.
Thanks,
Praveen.