Although the Vector class may appear to be what you want you must take
one more thing into consideration when using Vectors: they are
synchronized. This means that any operation which attempts to modify the
Vector (add or remove elements) must first obtain a lock on all elements
in the Vector to
First, Thanks to everyone who responded to my questions...
In researching data structures I found a great tutorial
http://www.algonet.se/~set_lo/java/javadata2/javadata2.html
I also came across the Vector class in jdk 1.2 which seems to be built for this
type of thing, however I haven't spent en
niel Selman
[EMAIL PROTECTED]
http://www.tornadolabs.com
> -Original Message-
> From: Discussion list for Java 3D API
> [mailto:[EMAIL PROTECTED]]On Behalf Of Jeremy Buchmann
> Sent: 22 January 2000 21:24
> To: [EMAIL PROTECTED]
> Subject: Re: [JAVA3D] appending arra
The Casteels wrote:
>
> I'd love to here everyone's opinion on the following, positive or
> negative.
>
> I'm looking for a faster way to append arrays. Up to this point I'm
> creating a new array every time I need to append, giving it a length of
> n+1 then copying the data from my previous array
> I'm looking for a faster way to append arrays. Up to this point I'm
Are you using System.arraycopy()? As far as I understand this calls the
underlying C function memcpy(), which is what is called by the C function
realloc() when it can't expand an array without moving it somewhere
else. This is
I'd love to here everyone's opinion on the following, positive or
negative.
I'm looking for a faster way to append arrays. Up to this point I'm
creating a new array every time I need to append, giving it a length of
n+1 then copying the data from my previous array into the new one and
filling the