In java while using the HashMap, they are using the Iterator class. But I can’t understand for what purpose they are using Iterator in HashMap?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Iterators should e used to read the elements from any kind of Collections like ArrayList, HAshMap etc.
They will help us to navigate through the Iterator Objects, if they are not there, how can we retrieve the elements from the collection?