Java List Join join(String delimiter, List strings)

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

Description

join

License

Apache License

Declaration

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

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.List;

public class Main {
    public static String join(String delimiter, List<String> strings) {
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < strings.size(); i++) {
            String part = strings.get(i);
            if (i != 0)
                stringBuilder.append(delimiter);
            stringBuilder.append(part);//w w w. j  a  va  2s. c  o m
        }
        return stringBuilder.toString();
    }
}

Related

  1. join(List values, String separator)
  2. join(List... lists)
  3. join(List... ls)
  4. join(List... elements)
  5. join(String _delimiter, List _strings)
  6. join(String joiner, List joinees)
  7. join(String joinString, List strings)
  8. join(String joint, List elements)
  9. join(String sep, List a)