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 to create packages in java?
What is java beans?
How can an exception be thrown manually by a programmer?
Which browsers work with java?
A person says that he compiled a java class successfully without even having a main method in it? Is it possible?
How can you make a class serializable in java?
Explain the difference between association, aggregation and inheritance relationships.
What is mvc in java?
What is a get method?
Why main() method is public, static and void in java ?
what is mena by object block any what is the use of that
Why we use multi threading instead of multiprocessing?
Does substring start with 0?
What are disadvantages of java?
Which is better stringbuffer or stringbuilder?