Practical No. 14: Develop program for implementation of Vectors in Java

1) Write a program to insert different elements in the Vector and display them.

2) State the output
import java.util.*;

class demo1
{
public static void main( String args[] )
{
Vector v = new Vector(20);
System.out.println( v.capacity() );
System.out.println( v.size() );

}
}


Previous
Next Post »