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.*;

public class Main {
    public static String collectionToStr(Collection<?> collection) {
        if (collection != null) {
            StringBuilder sb = new StringBuilder();
            for (Object obj : collection) {
                sb.append(obj.toString());
            }
            return sb.toString();
        } else {
            return "";
        }
    }
}