i'm new to java.. i've made a linked hashmap like :
Map<String, Double> MonthlyCPIMenu = new LinkedHashMap<String, Double>(); MonthlyCPIMenu.put("1394/10", 0.0); MonthlyCPIMenu.put("1394/09", 231.6); MonthlyCPIMenu.put("1394/08", 228.7); MonthlyCPIMenu.put("1394/07", 227.0); MonthlyCPIMenu.put("1394/06", 225.7); I know how to find each item's index using (for example):
String duemonth="1394/08"; int indexduemonth = new ArrayList<String>(MonthlyCPIMenu.keySet()).indexOf(duemonth); but I don't know how to find the value using index. (I know how to get the value using key but in this case i should use index for some reason)