Java tutorial
//package com.java2s; import java.util.StringTokenizer; public class Main { public static String getAtLeastOne(StringTokenizer stringT) { StringBuilder text = new StringBuilder(stringT.nextToken()); while (stringT.hasMoreTokens()) { text.append(' '); text.append(stringT.nextToken()); } return text.toString(); } }