What differences exist between iterator and listiterator?



What differences exist between iterator and listiterator?..

Answer / Rakesh Kumar Rajak

"Iterator and ListIterator are interfaces used to iterate over collections in Java. They both allow the sequential access of elements but have some differences:n
1. Iterator only provides methods for moving forward through the collection. ListIterator, on the other hand, provides methods to move backward as well.
2. Iterator cannot add or remove elements while ListIterator can insert and delete elements."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

If a method is declared as protected, where may the method be accessed?

1 Answers  


Can we use String with switch case?

1 Answers  


explain System.out.println

107 Answers   Calpine Technologies, Care, Cognizant, CTS, IBM, IBS, LibSys, Oracle, Spiro Solutions, TCS,


How do you add an element to a hashset in java?

1 Answers  


What is the difference between an object-oriented programming language and object-based programming language?

1 Answers  


What is difference between == and === in js?

1 Answers  


What are the differences between heap and stack memory in java?

0 Answers  


Break statement can be used as labels in java?

1 Answers  


What is string made of?

1 Answers  


What is the difference between jdk, jre, and jvm?

1 Answers  


real time example for deadlock,starvation,livelock

5 Answers  


What are the topics in advance java?

1 Answers  


Categories