What is the difference between Iterator and Listiterator ?
There are two Differences are there :
1. We can use Iterator to traverse Set and List and also Map type of Objects. But List Iterator can be used to traverse for List type Objects, but not for Set type of Objects.
That is, we can get a Iterrator object by using Set and List, see here :
1. We can use Iterator to traverse Set and List and also Map type of Objects. But List Iterator can be used to traverse for List type Objects, but not for Set type of Objects.
That is, we can get a Iterrator object by using Set and List, see here :
Methods in Iterator :
1. hashNext()
2. next()
3. remove()
Iterator ite = Set.iterator();
Iterator ite = List.iterator();
