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 8627565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:18:46+00:00 2026-06-12T08:18:46+00:00

Possible Duplicate: Difference between Java Enumeration and Iterator I was reading this post Difference

  • 0

Possible Duplicate:
Difference between Java Enumeration and Iterator

I was reading this post “Difference between Iterator & Enumeration“

If can use either iterator methods or enumeration methods to perform the same action then what is the difference?

Where am I expected to use either of these interfaces?

  • 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-12T08:18:47+00:00Added an answer on June 12, 2026 at 8:18 am

    Enumerators are part of legacy Java 1.0. Iterators only appeared in Java 1.2. To my knowledge, Enumerators are only kept for backward compatibility. As per the java docs for Enumerator, all new code should user the Iterator interface.

    NOTE: The functionality of this interface is duplicated by the
    Iterator interface. In addition, Iterator adds an optional remove
    operation, and has shorter method names. New implementations should
    consider using Iterator in preference to Enumeration.

    You should use Iterators when looping through a collection, list, set, etc or something that implements that Iterator interface. You can also use the “new” (Java 5) for loop construct to iterate over such a collection. Keep in mind, however, that the only safe way to remove an item from a collection when looping is to use the Iterator.remove() method.

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

Sidebar

Related Questions

Possible Duplicate: What is the difference between Class.this and this in Java I know
Possible Duplicate: Is there a difference between x++ and ++x in java? Can anyone
Possible Duplicate: Difference between Color.red and Color.RED I have seen that the Java class
Possible Duplicate: Calculating the Difference Between Two Java Date Instances How do I get
Possible Duplicate: Is there a difference between single and double quotes in Java? I've
Possible Duplicate: Difference between pointer variable and reference variable in C++ I am reading
Possible Duplicate: StringBuilder and StringBuffer in Java what is the difference between StringBuilder and
Possible Duplicate: Difference between int[] array and int array[] I was sure that this
Possible Duplicate: Difference between a Structure and a Union in C I see this
Possible Duplicate: Java: What is the difference between implementing Comparable and Comparator? Difference between

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.