/** @ 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()); } }
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 |
Output:
Filed in: Z-A All Java Codes