Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static String arrayStringConvertStr(Iterable<String> ids, String delimiter) {
        StringBuffer buffer = new StringBuffer();
        boolean first = true;
        for (String id : ids) {
            if (first) {
                buffer.append(id);
                first = false;
            } else {
                buffer.append(delimiter).append(id);
            }
        }
        return buffer.toString();
    }

    public static String arrayStringConvertStr(Iterable<String> ids) {
        return arrayStringConvertStr(ids, ",");
    }
}