Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.Iterator;
import java.util.List;

public class Main {
    public static String ListToString(String glue, List<Integer> myList) {
        String newString = "";
        for (Iterator<Integer> it = myList.iterator(); it.hasNext();) {
            newString += it.next();
            if (it.hasNext()) {
                newString += ", ";
            }
        }
        return newString;
    }
}