Java tutorial
//package com.java2s; import java.util.List; public class Main { public static String toUserEnteredString(List<String> term) { final StringBuilder builder = new StringBuilder(); for (String part : term) { if (builder.length() != 0) { builder.append(' '); } builder.append(part); } return builder.toString(); } }