posted 20 years ago
You've declared an array of Store objects called s, and instantiated the array with a length of 2...
Store[] s = new Store[2];
But there are no Store objects referenced in the array. Instead, s[0] and s[1] are both null, which results in the NullPointerException when you attempt to dereference them.
You need to assign references to Store instances. For example...
s[i] = new Store();
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org