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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:53:20+00:00 2026-06-04T14:53:20+00:00

I want to know the comparison between List and Set in terms of performance,memory

  • 0

I want to know the comparison between List and Set in terms of performance,memory allocation and usability.

If i don’t have any requirement of keeping the uniqueness in the list of objects, neither required the insertion order to be maintained, Can I use ArrayList and SortedSet/HashSet interchangeably?
Will it be good to directly use Collections class instead of even list/set?

P.S. I also don’t have any need for list or set specific functions provided by java.
I am using List/Set instead of Array only because they can dynamically grow without extra programming efforts.

  • 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-04T14:53:21+00:00Added an answer on June 4, 2026 at 2:53 pm

    If you don’t care about the ordering, and don’t delete elements, then it really boils down to whether you need to find elements in this data structure, and how fast you need those lookups to be.

    Finding an element by value in a HashSet is O(1). In an ArrayList, it’s O(n).

    If you are only using the container to store a bunch of unique objects, and iterate over them at the end (in any order), then arguably ArrayList is a better choice since it’s simpler and more economical.

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

Sidebar

Related Questions

I have to do a comparison and I want to know which will be
i want to know in Detail comparison between iPhone OS 3.0 and 3.1.3 and
Almighty Gurus, Please tell me, I want to know can comparison sm. set of
I have an android app it displays web view.I want know the app idle
Want to know what is the difference between ipv4 and ipv6 and how does
I have a model with an expiration DateField. I want to set up an
I want to know the logic behind such comparison. Same is being done by
I have a query and I just want to know if its possible to
I have two different algorithms and want to know which one performs better in
i want know how i can manage multiple twitter account on iOS in my

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.