Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.*;

public class Main {
    public static String toString(Collection coll) {
        return toString(coll, "   ");
    }

    public static String toString(Collection coll, String sep) {
        if (coll == null)
            return null;
        StringBuilder sbuf = new StringBuilder(sep == "\n" ? sep : "");
        for (Object o : coll)
            sbuf.append("" + o + sep);
        return sbuf.toString();
    }
}