[1484] in java-interest

home help back first fref pref prev next nref lref last post

dynamic lists

daemon@ATHENA.MIT.EDU (John D. Mitchell)
Tue Sep 5 22:00:54 1995

Date: Tue, 5 Sep 1995 16:15:46 -0700
From: "John D. Mitchell" <johnm@emf2-003.emf.net>
To: vin@mufasa.Eng.Sun.COM (Vin Locke [CONTRACTOR])
Cc: java-interest@java.Eng.Sun.COM
In-Reply-To: <199509051614.JAA01022@redleaf.Eng.Sun.COM>

Vin Locke writes:
> I am trying to implement something on the level of a linked list of 
> indeterminate length in java.  From reading the docs and hearing a few
> talks, it seems that the Array is the data structure for this.
> But doesn't the array need a size at time of creation?
> Is there a way to "grow" an array (sort of a realloc)?
[...]

Use the Vector class from the java.util package.  You can think of it as a
like the various DynArray classes in everybody's C++ libraries. :-)

Take care,
	John


-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post