Java List Join join(List strings, String separator)

Here you can find the source of join(List strings, String separator)

Description

join

License

Open Source License

Declaration

public static String join(List<String> strings, String separator) 

Method Source Code

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

import java.util.Iterator;
import java.util.List;

public class Main {
    public static String join(List<String> strings, String separator) {
        StringBuilder sb = new StringBuilder();
        for (Iterator<String> i = strings.iterator(); i.hasNext();) {
            sb.append(i.next()).append(i.hasNext() ? separator : "");
        }/* ww  w .jav  a 2 s  .  c  om*/
        return sb.toString();
    }
}

Related

  1. join(List strings, String joiner)
  2. join(List strings, String sep)
  3. join(List strings, String separator)
  4. join(List strings, String separator)
  5. join(List strings, String separator)
  6. join(List strings, String separator)
  7. join(List stringsToJoin, char delimiter)
  8. join(List strList, char separator)
  9. join(List strList, String sep)