You are making things too difficult for yourself.
Well, actually, you will have no real problems. That array, being nicely set to
null, will throw a load of nice Exceptions whenever you try to use it
You should delete that array, and use the same array which is already a field in the surrounding class.
You will need an
int called
size which should be set in the surrounding class already. You need to use that in the hasNext method
The remove() method should remove. If you are dealing with an array, you would have to reduce the rest of the array:
In the else part of the next() method, you throw the NoSuchElementException.
At least I think that is what you do. Anybody finding any mistakes (especially Joanne and Rob), be sure to tell me. But I am off to cook tea now, so I shan't take any notice.