|
Author |
Topic: Array manipulation (Read 233 times) |
|
Dan
|
Array manipulation
« on: Dec 18th, 2003, 4:41pm » |
|
Is it possible to have a dynamic array, like in javascript. I want to be able to define an empty array and then push items on to it. Thanks
|
|
|
|
mflux
|
Re: Array manipulation
« Reply #1 on: Dec 19th, 2003, 2:51pm » |
|
Look up Vectors in the java util lib. You can find the syntax and member functions on google if you just search for java vector util. Vectors are a bit slower than normal arrays but allow you to insert elements, remove elements, etc with a dynamic size. I believe that's what you're looking for. Oh, and use addElement() not add(), removeElement(), not remove() if you intend for people with a lower version of Java in their browsers to be able to see it.
|
|
|
|
|