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 {
    public static String implode(String glue, List<String> listArr) {
        String ret = "";
        for (int i = 0; i < listArr.size(); i++) {
            ret += (i == listArr.size() - 1) ? listArr.get(i) : listArr.get(i) + glue;
        }
        return ret;
    }
}