[Solved] Does HashMap gives output in the same order as the order in which the data is added to it?


No.

Hash table based implementation of the Map interface. This implementation provides all of
the optional map operations, and
permits null values and the null key. (The HashMap class is roughly
equivalent to Hashtable, except that it is unsynchronized and permits
nulls.) This class makes no guarantees as to the order of the map;
in particular, it does not guarantee that the order will remain
constant over time.

Source: http://docs.oracle.com/javase/7/docs/api/java/util/HashMap.html

solved Does HashMap gives output in the same order as the order in which the data is added to it?