3:29 pm - Wednesday June 21, 7656

Vector Example Program for clear()

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044
/**
@ AUTHOR:Candid java.com
@ DESCRIPTION:coding for clear the elements in the vector
*/
import java.util.Vector;
class Clear
{
public static void main(String[] args)
 {
Vector v = new Vector();
v.add("One");
v.add("Two");
v.add("Three");
v.add("Four");
v.clear();
System.out.println("Size of the vector is:"+v.size());
}
}

Output:
size of the vector is:0

Filed in: Z-A All Java Codes

Comments are closed.