Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8252147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:28:27+00:00 2026-06-08T00:28:27+00:00

As Iterator is an interface with hasNext(), next() and remove() methods. But where is

  • 0

As Iterator is an interface with hasNext(), next() and remove() methods. But where is the implementation for all these methods in Java classes?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T00:28:30+00:00Added an answer on June 8, 2026 at 12:28 am

    Almost every concrete collection has its own implementation, optimized for that specific collection. You don’t have to bother about the details. But here are some examples:

    • LinkedList – class ListItr implements ListIterator<E>
    • ArrayList – class ListItr extends Itr implements ListIterator<E>
    • HashSet – actually backed by HashMap.keySet()

    Becasue Iterator is an interface, you can do fancy things with it, like wrapping and decorating it, without paying attention to the actual implementation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The java.lang.Iterator interface has 3 methods: hasNext , next and remove . In order
I have an implementation of java.util.Iterator which requires that the call to next() should
Iterator<String> iterator=... //right way for (Iterator<String> i = iterator; i.hasNext(); ){ System.out.println(i.next()); } //why
What is Iterator and collections? Does these two have any relations? // the interface
I am doing a research on java iterator interface and cannot understand why it
Is the interface Iterator already defined somewhere in java library (mind the terminology). i.e.
Why does the Iterator interface not extend Iterable ? The iterator() method could simply
In Iterator Sun added the remove method to remove the last accessed element of
Here's an excerpt from java.text.CharacterIterator documentation: This interface defines a protocol for bidirectional iteration
I need to implement a bag data structure using the interface java.util.Collection . I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.