Quote:
|
Originally Posted by azurik
Looks like this works:
public void createDatabase(int maxPlayerNumber, double maxLoadFactor) {
int databaseSize = getClosestPrime((int)(maxPlayerNumber / maxLoadFactor));
class ProductArray extends ArrayList<Character> { }
ArrayList<Character>[] chainArray = new ProductArray[databaseSize];
database = chainArray;
}
Thx. Though it's quite unrelated to that warning, a new warning pops up that I usually see when extending many classes. I've never understood what it meant and I believe it starting popping up all over my code once 1.5 came out. It says: "The serializable class ProductArray does not declare a static final serialVersionUID field of type long". Normally, I just ignore it (sometimes I set serialVersionUID to 0, just to shut it up), but what exactly is "serialVersionUID" supposed to be representing?
EDIT: And yes, that is a quite different approach than I would have ever thought of. 
|
From how I understand it (and I may be off the mark here), you only need to worry about it if youre going to have concurrent access (many users running the same program at the same time, possibly changing the same data).