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 is string immutable in java?
How much is a java license?
What is the purpose of the strictfp keyword?
Why are the objects immutable in java?
Explain abstract class in java?
What is main method?
Difference between ‘is-a’ and ‘has-a’ relationship in java?
What do you mean by scope of variable?
How an object is serialized in java?
What are identifiers in java?
Explain polymorphism citing an example.
Is break statement can be used as labels in java?
How do you do math powers in java?
Write a program in java to find the maximum and minimum value node from a circular linked list.
Why string objects are immutable in java?