Here you can find the source of sum(String[] tokens, int start, int length, String separator)
public static String sum(String[] tokens, int start, int length, String separator)
//package com.java2s; //License from project: Open Source License public class Main { public static String sum(String[] tokens, int start, int length, String separator) { StringBuffer buffer = new StringBuffer(); for (int i = start; i < length + start; i++) { buffer.append(tokens[i]);//from w w w .j av a 2s . c om if (i != length + start - 1) { buffer.append(separator); } } return buffer.toString(); } }