Java Array Concatenate concatArray(String[] array, int start, String def)

Here you can find the source of concatArray(String[] array, int start, String def)

Description

concat Array

License

Open Source License

Declaration

public static String concatArray(String[] array, int start, String def) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String concatArray(String[] array, int start, String def) {
        if (array.length <= start)
            return def;
        if (array.length <= start + 1)
            return array[start];
        String ret = array[start];
        for (int i = start + 1; i < array.length; i++) {
            ret += " " + array[i];
        }//from  w  ww  . j  av a 2  s  . co m
        return ret;
    }
}

Related

  1. concatArray(int[] src, String separator)
  2. concatArray(Object... objects)
  3. concatArray(Object[] arr1, Object newValue)
  4. concatArray(String string, String[] words)
  5. concatArray(String[] array, int start)
  6. concatArray(String[] array, String glue)
  7. concatArray(T[] first, T[]... rest)
  8. concatArrays(byte[] a, byte[] b)
  9. concatArrays(byte[]... arrays)