View Single Post
Old Jun 13th, 2006, 9:19 PM   #3
azurik
Newbie
 
Join Date: May 2006
Posts: 6
Rep Power: 0 azurik is on a distinguished road
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.
azurik is offline   Reply With Quote