int x [] = new int [9];
--There are 10 elements in this array (0-9) right.
That's wrong, there's 9 elements, from 0 - 8
You don't need to expand the array, you can just use an ArrayList which will do it for you. With an arraylist, you can just add stuff to it, it will dynamically increase in size or decrease.
Dan
[ February 04, 2006: Message edited by: Dani Atrei ]