Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.List;

public class Main {
    /**
     * Convert the list of Integers into a comma separated
     * string so that it's easy to load back in.
     * @param list
     * @return
     */
    public static String toString(List<?> list) {
        StringBuffer buf = new StringBuffer();
        for (Object o : list)
            buf.append(o + ",");
        buf.deleteCharAt(buf.length() - 1);
        return buf.toString();
    }
}