When we add values to hashmap<Key, Value>
variable using put()
, are they always ordering?
Because when I tried with simple codes they are ordering.
Example:
Map<Integer, Integer> ctrArMap = new HashMap<Integer, Integer>();
ctrArMap.put( 1, 11);
ctrArMap.put( 2, 12);
ctrArMap.put( 3, 13);
ctrArMap.put( 4, 14);
ctrArMap.put( 5, 15);
System.out.println(ctrArMap);
But in my case they aren't ordering.