I have this HashMap that I need to print out in ascending order according to the values contained in it (not the keys
HashMap
Try:
try { int cnt= m.getSmartPhoneCount("HTC",true); System.out.println("total count of HTC="+cnt); } catch (NoSuchBrandSmartPhoneAvailableException e) { // TODO Auto-generated catch e.printStackTrace(); }