J
Jeremy Watts
i am writing a java method which needs to take note of a set of numbers
generated by the routine as it runs. the problem is that i dont know
beforhand how many of these numbers will be generated, so the simple use of
an array cant be used as java seems to insist of the size of the array to be
declared upfront, where as i say i dont have this information prior to
running the method.
there are other java data constructs but i am a bit bemused as to what would
be appropriate here. i am no java expert so what i am looking for is what
used (or still is i dont know) to be called a 'dynamic array' ie. one whose
size may change throughout the running of a program
thanks
generated by the routine as it runs. the problem is that i dont know
beforhand how many of these numbers will be generated, so the simple use of
an array cant be used as java seems to insist of the size of the array to be
declared upfront, where as i say i dont have this information prior to
running the method.
there are other java data constructs but i am a bit bemused as to what would
be appropriate here. i am no java expert so what i am looking for is what
used (or still is i dont know) to be called a 'dynamic array' ie. one whose
size may change throughout the running of a program
thanks