Hello.
Like as the title sayes. Im trying to edit key values in a Map/hashMap/treeMap.
For example:
public class MapExample {
public static void main(String[] args) {
Map<int,String> mp=new HashMap<int, String>();
// adding or set elements in Map by put method key and value pair
mp.put(12, "Two");
mp.put(11, "One");
mp.put(13, "Three");
mp.put(14, "Four");
}
}
I want to edit it to
mp.put(2, "Two");
mp.put(1, "One");
mp.put(3, "Three");
mp.put(4, "Four");
I was chacking java API but i haven't finde anything useful.
Thanks for help.