Click here to watch in Youtube :
https://www.youtube.com/watch?v=9GKAGw8Nejw&list=UUhwKlOVR041tngjerWxVccw
import java.util.Vector; /* * Example of size() method. */ public class VectorExample { public static void main( String[] args ) { Vector<Integer> vector = new Vector<Integer>(); vector.add(20); vector.add(30); vector.add(40); vector.add(50); System.out.println("vector : " + vector + "\n"); /* * Returns the number of components in this vector. */ int size = vector.size(); System.out.println("size : " + size + "\n"); } }
vector : [20, 30, 40, 50] size : 4
https://sites.google.com/site/javaee4321/java-collections/VectorDemoSize.zip?attredirects=0&d=1
See also:
Well, Thanks for your article.
ReplyDeleteIts impressive to know something about your note on JAVA Applications. Please do share your articles like this your articles for our awareness. Mostly we do also provide JAVA Courses Online Training . For more info Contact-Us at@ Tectist.com.