Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static <T> String join(T[] array, String join) {
        StringBuilder builder = new StringBuilder();
        for (T t : array) {
            builder.append(t);
            builder.append(join);
        }
        return builder.deleteCharAt(builder.length() - 1).toString();
    }
}