import java.util.*;
class CollectionEx{
public static void main(String arg[]){
Vector obj = new Vector();
obj.add(new Integer(99));
obj.add(new Integer(78));
obj.add(66);
Type: Posts; User: gautammuktsar@gmail.com
import java.util.*;
class CollectionEx{
public static void main(String arg[]){
Vector obj = new Vector();
obj.add(new Integer(99));
obj.add(new Integer(78));
obj.add(66);
then could be necessary for the class which implements the Iterator to provide defination for their all 3 methods ??...but while using Iterator to transverse the elements of collection(container) we...
Well thank you . But one thing more in case of List interface ,class ArrayList is implementing List interface but my question is which class is implementing the Interface Iterator .
i m new to java and as a matter of fact ,i m a bit confusing that how a interface contain whole methods..i have read that interface can contain only the defination of the method ..can you make me...
what is iterator ??
is it a interface or object ??