On Sep 11, 2:03 pm, Michael Burgess <[EMAIL PROTECTED]> wrote:
>             values = new ArrayList<Integer>(13);
>             values.set(n, jobcount);

Looks good.  Only problem with using an ArrayList is that it only
expands when you add items to the end.  Constructing with 13 is only a
suggested initial capacity.

    new ArrayList(13).set(4, "");

produces...

    Exception in thread "main" java.lang.IndexOutOfBoundsException:
Index: 4, Size: 0

I would recommend creating your own class which is added to the Map.
Within that have perhaps an int[12]; with setter, getter and add
methods which access the array safely.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to