In this blog post we will talk about What is difference between Iterator and LisIterator? One thing I would like to make you clear here is that this post only listed out the difference between Iterator and LisIterator but not the detail explanation with example.
Iterator Interface
An Iterator class provides us with 3 methods – next(), hasNext() and remove(). Every Collection in Java is Iterable – possess an iterator to allow traversal and removal its underlying elements.
LisIterator Interface
ListIterator – It is a specialized iterator for lists that allows to traverse the list bidirectionally, modify the list during iteration, and obtain the iterator’s current position in the list. It allows complete modification – remove, add and update operations are provided.
You may also like:
What are fail-fast and fail-safe Iterator?
Why Prime Numbers are considered in writing certain algorithms like hashcode()?
What are the important paradigms for Developing the Clean Object-Oriented Code?
What are new Features added in Java 8?
That’s all about What is difference between Iterator and LisIterator?
If you have any feedback or suggestion please feel free to drop in blow comment box.