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
Printable View
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
how about Vector.removeAllElements() ?
Simple solution.
data.clear();
This will clear the vector for you