I have a Java Property file and there is a KEY as ORDER. So I retrieve the VALUE of that KEY using the getProperty(
Use the String.split() method with the , separator to get the list of pairs. Iterate the pairs and use split() again with the : separator to get the key and value for each pair.
Map myMap = new HashMap();
String s = "SALES:0,SALE_PRODUCTS:1,EXPENSES:2,EXPENSES_ITEMS:3";
String[] pairs = s.split(",");
for (int i=0;i