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;
import java.util.Set;

public class Main {
    public static String StringFromMap(Map<String, String> map) {
        StringBuilder sb = new StringBuilder();
        Set<String> set = map.keySet();

        for (Iterator iter = set.iterator(); iter.hasNext();) {
            String key = (String) iter.next();
            sb.append(key + "    " + map.get(key) + "\n");
        }

        return sb.toString();
    }
}