Okay so I am writing a program for a space invaders game, and i keep getting a null pointer exception when in my missile class. I can't seem to figure out what went wrong... If anyone could help me out I would really appreciate it I've only been taking Java for about a year, so this is probably a really easy problem, but I just need a little bit of help to get me on the right track I'm also new to this forum so i don't really know what I'm doing, sorry if I do something wrong
the arrow i put in the text is where I keep getting the null pointer exception... The Shield class is below
The Shield Class
okay so basically i am trying to hide the filled rect at the array element that is visible when the missile interesects the shield. i have the basics off it down, but i still keep getting a null pointer exception. this is similar to what it should look like, but if anyone can help me figure out why i am getting that null pointer exception at the highlighted point, i would really appreciate it. in between the big arrows in the Shield class is where the isHit method that is being called is located. Thanks again