have a string like A=B&C=D&E=F, how to parse it into map?
String t = A=B&C=D&E=F; Map map = new HashMap(); String[] pairs = t.split("&"); //TODO 1) Learn generis 2) Use gnerics for (String pair : pairs) { String[] kv = pair.split("="); map.put(kv[0], kv[1]); }