Here you can find the source of mergeTimeStrings(List
private static String mergeTimeStrings(List<String> strs)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { private static String mergeTimeStrings(List<String> strs) { StringBuilder sb = new StringBuilder(); for (int i = strs.size() - 1; i >= 0; i--) { sb.append(strs.get(i));/* w w w .j ava2 s .c om*/ sb.append(' '); } int lastChar = sb.length() - 1; if (lastChar >= 0) { sb.deleteCharAt(lastChar); } return sb.toString(); } }