I have an HashMap object, which has with key and value pair.
It has 10 keys and values in that object. Now the question
is I want insert new key and value in middle or any where in
that list but not at the end or at the top. Is it possible
or not. If yes how can we achieve this one?
Answer Posted / alka
It is not in the programmers hand to decide location of any
key/value pair in hashmap.These pairs are randomly placed in
Hashmap based on some calculated hash codes.
| Is This Answer Correct ? | 20 Yes | 0 No |
Post New Answer View All Answers
design an lru cache in java?
Can you explain inner class.
What are drawbacks of singleton class?
Is java code slower than native code?
Explain the importance of thread scheduler in java?
Can the garbage collection be forced by any means?
What are latest features introduced with java 8?
What is the main functionality of the remote reference layer?
What are the advantages of passing this into a method instead of the current class object itself?
How to make a read-only class in java?
How do you sort a string in java?
What are the actions that can occur when a thread enters blocked state?
What is singleton pattern?
Why java is said to be pass-by-value ?
What is difference between next () and nextline () in java?