Here you can find the source of concat(List
private static String concat(List<String> words)
//package com.java2s; /**/*from ww w.j av a 2s. c om*/ * This software is released under the University of Illinois/Research and Academic Use License. See * the LICENSE file in the root folder for details. Copyright (c) 2016 * * Developed by: The Cognitive Computation Group University of Illinois at Urbana-Champaign * http://cogcomp.cs.illinois.edu/ */ import java.util.List; public class Main { private static String concat(List<String> words) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < words.size(); i++) sb.append(i > 0 ? "@" : "").append(words.get(i)); return sb.toString(); } }