Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import java.util.Iterator;

import java.util.Map;

public class Main {
    public static String mapToString(Map<String, String> paramMap) {
        String paramsStr = "";
        Iterator<Map.Entry<String, String>> entries = paramMap.entrySet().iterator();

        while (entries.hasNext()) {
            Map.Entry<String, String> entry = entries.next();

            paramsStr += "&";
            paramsStr += entry.getKey() + "=" + entry.getValue();
        }
        return paramsStr;
    }
}