hi tan kian
First of all,
you should check whether the value i is bigger than the default array or not, then decide to create the array, if the value is smaller than the default array, then use exception handler to handle the exception, if you want to use the default size of array.
It may be better if the array is created from the input value, not hard-code the size and value of array.
[ April 09, 2004: Message edited by: siu chung man ]