you are talking about some type of List? maybe LinkedList
You might want to read:
Tutorial on Collections@ oracle.com [
^]
You can also rush through there with a foreach loop:
for (int i: oList){
System.out.println("List entry\t" + i);
}
Or is it more a database thing to make a query like "select nextVal('')" ???