Java Collection Join join(Collection strs)

Here you can find the source of join(Collection strs)

Description

join

License

Open Source License

Declaration

public static String join(Collection<?> strs) 

Method Source Code

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

import java.util.Collection;

public class Main {

    public static String join(Collection<?> strs) {
        StringBuilder sb = new StringBuilder();
        for (Object str : strs) {
            sb.append(str);/*from   w  ww  .ja v  a 2  s  .  co m*/
        }
        return sb.toString();
    }

    public static String join(Object... strs) {
        StringBuilder sb = new StringBuilder();
        for (Object str : strs) {
            sb.append(str);
        }
        return sb.toString();
    }
}

Related

  1. join(Collection strings, String delimiter)
  2. join(Collection strings, String delimiter)
  3. join(Collection strings, String separator)
  4. join(Collection strings, String separator)
  5. join(Collection strings, String separator)
  6. join(Collection toJoin, String joinBy)
  7. join(Collection tokens, String d)
  8. join(Collection values)
  9. join(Collection collection, String separator)