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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:02:46+00:00 2026-05-22T16:02:46+00:00

LinkedHashMap<String,ArrayList<String>> h; It contains: key 1 : value A, B, C, D 2 :

  • 0
LinkedHashMap<String,ArrayList<String>> h;

It contains:

key 1 : value A, B, C, D
2 : E,F
3 : G

I don’t quite understand the Set interface. Maybe a little visualization would help. Please help me to visualize how would all these elements inside LinkedHashMap look like once I convert them into Set?

Set set = h.entrySet();

Sorry, maybe my question is a little obscure. I will try to sharpen it as the thread develops.

  • 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-05-22T16:02:46+00:00Added an answer on May 22, 2026 at 4:02 pm

    The entry-set of a Map is the set of entries in the map.

    An entry in a map is a mapping from key to value. In your case where the map is of type ...<String, ArrayList<String>>, an single entry is a pair of a String (the key) and an ArrayList<String> (the value).

    The following snippet may shed some light on this:

    LinkedHashMap<String, List<String>> map =
            new LinkedHashMap<String, List<String>>();
    
    map.put("1", Arrays.asList("A", "B", "C"));
    map.put("2", Arrays.asList("E", "F"));
    map.put("3", Arrays.asList("G"));
    
    System.out.println(map.entrySet());
    System.out.println(map.entrySet().getClass());
    

    Output:

    [1=[A, B, C], 2=[E, F], 3=[G]]     # All entries (key/value pairs)
    class java.util.HashMap$EntrySet   # This particular entry set class.
    

    In this case for instance, the entry set is actually an inner class of HashMap, named EntrySet.

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

Sidebar

Related Questions

I have the following code: LinkedHashMap<String,ArrayList<String>> h; Set set = h.entrySet(); Iterator i =
I have java.util.LinkedHashMap with Integer as Key and Character as Value. I know the
I am using String object as the key to a linkedhashmap. How can I
I have the first key/value pair in a LinkedHashMap, which I get from a
I have LinkedHashMap<String,ArrayList<String>> h If I do this: System.out.println(h.get(key1)) ; it prints out this:
Let's say I have something like this: LinkedHashMap <String, ArrayList<String>> h keyOne has stringOne
I have the following problem: I would like to change value of ExpandableListView's cell
What is the difference between HashMap , LinkedHashMap and TreeMap in Java? I don't
It would be nice to use for (String item: list) , but it will
Ive come across a nice problem recently, I have a Map LinkedHashMap<String, List<MyCustomObject>> I

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.