Java tutorial
//package com.java2s; import java.util.Map; public class Main { public static String map2String(Map<String, String> map) { StringBuilder result = new StringBuilder(); if (map == null || map.size() == 0) return ""; for (String key : map.keySet()) { result.append(key).append("=").append(map.get(key)).append("&"); } return result.substring(0, result.length() - 1); } }