Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.Hashtable;
import java.util.Iterator;

public class Main {
    public static String Map2StringPrettyPrint(Hashtable m) {
        String retString = "";
        Iterator iter = m.keySet().iterator();

        while (iter.hasNext()) {
            String key = (String) iter.next();
            retString += key + " = " + m.get(key) + "\n";
        }

        return (retString.trim());
    }
}