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
What happens if we don’t define serial version uid?
What does singleton mean in java?
What is double data type?
How does linkedhashmap work in java?
Why does my function print none?
what state does a thread enter when it terminates its processing? : Java thread
What is maximum size of arraylist in java?
Can we override constructor in java?
What are inbuilt functions?
Explain about core java?
when should you use stringbuilder class in a program?
What is a priority queue java?
Can we make a constructor final?
Why does java have different data types for integers and floating-point values?
Difference between arraylist and hashset in java?