Java tutorial
//package com.java2s; import java.util.HashMap; import java.util.Map; public class Main { public static Map<String, String> getQueryMap(String query) { String[] params = query.split("&"); Map<String, String> map = new HashMap<String, String>(); for (String param : params) { String[] splitted = param.split("="); map.put(splitted[0], splitted[1]); } return map; } }