Original Post
I'm writing an animation program for my Java class. It consists of two balls bouncing around the screen. Whenever the balls collide, I want to have particles explode in a random direction at the point of intersection. Here is my question. Is it possible to make an array of class objects in Java? I tried this and it compiled correctly, but when I ran my applet, it threw a lot of NullPointerExceptions at me. Here is how I initialize the array: int numParticles = 100; Particle pSmall[] = new Particle[numParticles]; It threw an exception at every place I tried to set a value to the selected particle. Anyone have any ideas how to fix this? Thanks in advance. Cyber