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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:33:02+00:00 2026-06-03T01:33:02+00:00

In java, List and Map are using in collections. But i couldn’t understand at

  • 0

In java, List and Map are using in collections. But i couldn’t understand at which situations we should use List and which time use Map. What is the major difference between both of them?

  • 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-03T01:33:03+00:00Added an answer on June 3, 2026 at 1:33 am

    Now would be a good time to read the Java collections tutorial – but fundamentally, a list is an ordered sequence of elements which you can access by index, and a map is a usually unordered mapping from keys to values. (Some maps preserve insertion order, but that’s implementation-specific.)

    It’s usually fairly obvious when you want a key/value mapping and when you just want a collection of elements. It becomes less clear if the key is part of the value, but you want to be able to get at an item by that key efficiently. That’s still a good use case for a map, even though in some senses you don’t have a separate collection of keys.

    There’s also Set, which is a (usually unordered) collection of distinct elements.

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

Sidebar

Related Questions

I am trying to deserialize/map the below JSON to List<Bill > java object using
In my java coding, I often end up with several Map<String,Map<String,foo>> or Map<String,List<String>> and
I am creating a class that implements java.util.List . My class is using E
import java.util.Arrays; import java.util.ArrayList; import java.util.Scanner; import java.util.Collections; import java.util.List; public class TennisTournament {
I'm getting this error when I use MarshallingView to marshal my list (java.util.List) of
I am using java.sql.SQLData interface to map my java objects to Oracle database types.
It would be nice to use for (String item: list) , but it will
We are using GraniteDS autogenerated AS code to map Java remote objects to AS.
This question relates to Java collections - specifically Hashtable and Vector - but may
First to say I'm n00b in Java. I can understand most concepts but in

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.