Here you can find the source of merge(String[] arr)
public static String merge(String[] arr)
//package com.java2s; //License from project: Apache License public class Main { public static String merge(String[] arr) { if (arr.length == 0) return ""; StringBuilder str = new StringBuilder(); for (String s : arr) str.append(s).append(' '); return str.toString().substring(0, str.length() - 1); }/*ww w . j ava 2 s . co m*/ }