Java Example Programs – Vector Clear() Method in Java

vector in java

Hello, in this post we will learn about Vector clear() method in java. clear() method we use to clear a vector.

it doesn’t delete a vector. it’s just clear the elements inside the vector.

we can use clear() method to make a vector empty.

This method doesn’t accept any parameter and it also dosen’t return anything.

Sample Output :

clearVector

Thanks for reading this post. if you have any comments or question or suggestion please comments below.

Leave a Reply

avatar
  Subscribe  
Notify of