I am new to using arrays of objects but can\'t figure out what I am doing wrong and why I keep getting a Null pointer exception. I am trying to create an Theatre class with
When you do "arrayOfSpotlights = new spotlight[N];" you init an array of length N, what you need to do is also init each object in it:
for i=0; i
Hope I'm correct :)