Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

My array is null...WHY?!

807588Apr 5 2009 — edited Apr 5 2009
Okay so I have to create an array, and later when I try to do something else it gives me an error. So when I run it through debug, I see competitors[null].

competitors is supposed to be an array of SportStacker objects, with a length of maxCompetitors. So, in my constructor, it takes maxCompetitors as an int.
SportStacker[] competitors = new SportStacker[maxCompetitors];
So why is my array competitors remaining null?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 3 2009
Added on Apr 5 2009
10 comments
204 views