Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.ArrayList;

public class Main {
    /**
     * Implode
     * @param ids
     * @return 
     */
    public static String convertToCommaDelimitedString(ArrayList<String> ids) {
        String out = "";
        for (int i = 0; i < ids.size(); i++) {
            if (i != 0) {
                out += "','";
            }
            out += ids.get(i).toString();
        }
        return "'" + out + "'";
    }
}