Java Array Concatenate concat(String[] strs)

Here you can find the source of concat(String[] strs)

Description

concat

License

Open Source License

Declaration

public static String concat(String[] strs) 

Method Source Code

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

import java.util.*;

public class Main {
    public static String concat(String str1, String str2) {
        return str1.concat(str2);
    }/*from ww  w.  j  a  va 2  s . co  m*/

    public static String concat(String[] strs) {
        StringBuilder builder = new StringBuilder();
        for (String str : strs) {
            builder.append(str);
        }
        return builder.toString();
    }

    public static String concat(List<String> strs) {
        StringBuilder builder = new StringBuilder();
        for (String str : strs) {
            builder.append(str);
        }
        return builder.toString();
    }
}

Related

  1. concat(int[]... arrays)
  2. concat(Object[] array)
  3. concat(Object[] first, Object second)
  4. concat(String[] array, String separator)
  5. concat(String[] parts)
  6. concat(String[]... arrays)
  7. concat(T val, T[] vals)
  8. concat(T[] a, T[] b)
  9. concat(T[] a, T[] b, T[] c, T[] d)