Hello there Stack overflowers I have problem with my hashmap foreach order in android. i have:
hm = new HashMap<>();
hm.put("aaaa","aaaa");
hm.put("bbbb","bbbb");
hm.put("cccc","cccc");
return hm;
and now i do foreach of this hashmap :
for(Map.Entry<String, String> entry : hashmap.entrySet()){
try{
String key = entry.getKey();
String value = entry.getValue();
Toast.makeText(getActivity(),key+" "+ value + " "+,Toast.LENGTH_LONG).show();
}catch (Exception e){
}
}
And it toast me in reverse order so :cccc cccc , bbbb bbbb, aaaa aaaa. What i must do to have my toast in good oreder ? Greetings