Java Array Sum sum(String[] tokens, int start, int length, String separator)

Here you can find the source of sum(String[] tokens, int start, int length, String separator)

Description

sum

License

Open Source License

Declaration

public static String sum(String[] tokens, int start, int length, String separator) 

Method Source Code

//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();
    }
}

Related

  1. sum(Number[] array)
  2. sum(Number[] numbers)
  3. sum(Object[] srcOne, Object[] srcTwo)
  4. sum(short tab[], int a, int b)
  5. sum(short[] ary)
  6. sum3(double[] a, double[] b)
  7. sum_configurations(int[] elements, int sum)
  8. sumabs(double[] in)
  9. sumandsub(String[] X)