Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the-map-interface.md #94

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Kishore1K
Copy link

@Kishore1K Kishore1K commented Nov 18, 2023

In TreeMap implementation the code is wrong

for (Map.Entry<String, Integer> entry : myMap2.entrySet()) {
           System.out.println(entry.getKey() + ": " + entry.getEntry.getValue());
   }

a this shows error it should be replaced with

for (Map.Entry<String, Integer> entry : myMap2.entrySet()) {
            System.out.println(entry.getKey() + ": " + entry.getValue());
 }

then it will work.

In TreeMap implementation the code is wrong "            System.out.println(entry.getKey() + ": " + entry.getEntry.getValue());" this shows error it should be updated to 
entry.getValue()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant