Java tutorial
//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(); } }