Click to See Complete Forum and Search --> : How to clear Vector of arrays???


March 2nd, 2000, 11:08 PM
I have a vector data that has arrays, I want to clear it when I test it
if it's not empty this is what I did :

if(!data.isEmpty()){
for(int i = 0; i < V_size; i++)
data.setElementAt(null,i); }



But it does not work, please help

poochi
March 3rd, 2000, 09:45 AM
how about Vector.removeAllElements() ?

March 24th, 2000, 02:07 PM
Simple solution.

data.clear();

This will clear the vector for you