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
How many threads does a core java have?
What is console based application in java?
What is sizeof () operator?
What are 5 boolean operators?
How can the checkbox class be used to create a radio button?
What do you understand by casting in java language?
Explain the use of volatile field modifier?
Why java doesn’t support multiple inheritances?
Are arrays static in java?
What is yield () in java?
What is the purpose of the finally clause of a try-catch-finally statement in java programming?
Is a boolean 1 bit?
Can we declare a static variable inside a method?
What is java util collection?
What is balanced tree in java?