posted 17 years ago
NullPointerException is thrown when the reference can't find an object to refer, when you are assuming that it actually refers an object!
By the way, an int[] can hold only integers; not objects!
Read it as "an integer array" where [] stands for array and int stands for integer. Precisely, it is an array that holds integers - got it?