import java.util.*;
public class First {
public static void main(String[] args) {
// TODO Auto-generated method stub
Vector<String> obj = new Vector<String>();
obj.add("India");
obj.add("Digital");
obj.add("Message");
obj.add("Super");
Iterator it = obj.iterator();
while(it.hasNext()){
System.out.println("the values are " +it.next());
}
}
}
output:-
the values are India
the values are Digital
the values are Message
the values are Super
public class First {
public static void main(String[] args) {
// TODO Auto-generated method stub
Vector<String> obj = new Vector<String>();
obj.add("India");
obj.add("Digital");
obj.add("Message");
obj.add("Super");
Iterator it = obj.iterator();
while(it.hasNext()){
System.out.println("the values are " +it.next());
}
}
}
output:-
the values are India
the values are Digital
the values are Message
the values are Super
No comments:
Post a Comment