import java.util.*;
class Exp5_1
{
public static void main(String[] args)
{
Vector v = new Vector();
for(int i=0;i<5;i++)
v.addElement(args[i]);
Enumeration vEnum = v.elements();
System.out.println("Elements in Vector are: ");
while(vEnum.hasMoreElements())
System.out.print(vEnum.nextElement() + " ");
}
}
/* OUTPUT!!!
javac Exp5_1.java
java Exp5_1 Java OS SP CS SE
Elements in Vector are:
Java OS SP CS SE
*/
class Exp5_1
{
public static void main(String[] args)
{
Vector v = new Vector();
for(int i=0;i<5;i++)
v.addElement(args[i]);
Enumeration vEnum = v.elements();
System.out.println("Elements in Vector are: ");
while(vEnum.hasMoreElements())
System.out.print(vEnum.nextElement() + " ");
}
}
/* OUTPUT!!!
javac Exp5_1.java
java Exp5_1 Java OS SP CS SE
Elements in Vector are:
Java OS SP CS SE
*/