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
Can you make a constructor final?
Why string is called as immutable?
How do you compare arrays in java?
What are java threads?
What about anonymous inner classes in java?
What are default methods ?
What function extracts specified characters from a string?
Explain about the interpreter in java?
what do you understand by synchronization? Or what is synchronization and why is it important? Or describe synchronization in respect to multithreading? Or what is synchronization? : Java thread
who can i handle multiple client in RMI
How is it possible for two string objects with identical values not to be equal under the == operator?
Difference between string, stringbuffer and stringbuilder?
Can classes declared using the abstract keyword cab be instantiated?
What is anagram of a string?
What is a method in coding?