Skip to content

Add an example of the HashMap and the working of the same #43

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

Closed
abhishektripathi66 opened this issue Nov 27, 2024 · 3 comments
Closed
Labels
good first issue Good for newcomers

Comments

@abhishektripathi66
Copy link
Owner

No description provided.

@abhishektripathi66 abhishektripathi66 added the good first issue Good for newcomers label Nov 27, 2024
Copy link

Stale issue message

@abhishektripathi66
Copy link
Owner Author

hashmap

@saurabh12nxf
Copy link
Contributor

Hi [@abhishektripathi66],

I came across the issue regarding the HashMap example and its working, and I’m interested in working on it. I have a good understanding of Java Collections Framework, and I am confident in my ability to implement this efficiently.

Here’s a brief overview of my approach:

  1. Creating a HashMap: I will create an instance of HashMap to store key-value pairs.
  2. Adding Key-Value Pairs: I will use the put method to add key-value pairs to the HashMap.
  3. Retrieving a Value: I will use the get method to retrieve a value by its key.
  4. Removing a Key-Value Pair: I will use the remove method to remove a key-value pair from the HashMap.
  5. Iterating Over the HashMap: I will use a for loop and the keySet method to iterate over the HashMap.
  6. Checking for Keys and Values: I will use the containsKey and containsValue methods to check if the HashMap contains specific keys or values.

Please let me know if I can be assigned this issue. I’m excited to contribute!

Thank you!

Best regards,
Saurabh Singh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants