The best way is to use collection, a List for example.
Type: Posts; User: angstrem
The best way is to use collection, a List for example.
So do you want some kind of memory in your object to remember the results of all your accesses and computations?
yes. [code=Java] before, [//code] (with 1 slash) after
NullPointerException means, that you're trying to do something with null. Hence, check up every object in main() to be not null. Please, wrap your code in the [code=Java]/*...*/[//code] - it's really...
Update the array during each access...
Can you post the code here?