Java tutorial
//package com.java2s; import java.util.Map; public class Main { public static String getMapAppendUrl(Map<String, String> params) { StringBuffer sb1 = new StringBuffer(); for (String key : params.keySet()) { sb1.append(key); sb1.append("="); sb1.append((String) params.get(key)); sb1.append("&"); } sb1.deleteCharAt(sb1.length() - 1); return sb1.toString(); } }