I have LinkedHashMap returning from db. From this map i need to get exactly last element(key). If i get all keys using keySet method it returns Set of keys but Set does not guarantee the order. i need to take exactly last key from the linked hashmap returned from db. how can i do that ?
below is the code how i get data from data base.
LinkedHashMap<String,String> map = someDao.getMap(String input);
from this map i need to take last element.
Thanks!