Remove All Elements from a Vector in JDK1.1.6

What is the method that flushes a Vector in JDK1.1.6.  In 2.0 the clear() method works.


Thanks in advance,
ubsjmgAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
anilbathulaConnect With a Mentor Commented:
Use removeAllElements() or just U create the new Instances of the same vector.
0
 
Jim CakalicSenior Developer/ArchitectCommented:
The pre-Collections method in Vector is removeAllElements.

Jim Cakalic
0
 
Laminamia063099Commented:
If you want to clear a Vector, the simplest way (that works for any class) would be to create a new one, which would drop the handle to the old one which would then be garbage collected later.  This, however, only would work if the Vector was only referenced by one object.

Just my 1/2 cent.

Laminamia :)
0
 
maheshsivakumarCommented:
As far as I know
It should be removeAllElements()
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.