I created an inner class, that extends Thread. Pretty simple class, I override the run method, which does what I want. However I stored objects of this type in an array, BUT I forgot to do the arrayname = new objectname[10]; or whatever number I wanted. I just declared objectname[] arrayname;
So obviously I should get a null pointer exception if I try arrayname[0] = new objectname(args);
The constructor for the inner class had start(); in it so it began as soon as I created it. With this in the constructor, I still get the exception, but it begins running the Thread anyway??? How can it do this? If I take the start() out of the constructor, and try to do arrayname[0].start(); it does not work as expected. What do I not know about? Just curious, it’s not caused any problems.