Java List Join join(List lines, char delim)

Here you can find the source of join(List lines, char delim)

Description

join

License

GNU General Public License

Declaration

public static String join(List<String> lines, char delim) 

Method Source Code

//package com.java2s;
/**//from   ww w  .  java  2s .c  om
 * Copyright (C) 2016, CERN
 * This software is distributed under the terms of the GNU General Public
 * Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE".
 * In applying this license, CERN does not waive the privileges and immunities
 * granted to it by virtue of its status as Intergovernmental Organization
 * or submit itself to any jurisdiction.
 */

import java.util.List;

public class Main {
    public static String join(List<String> lines, char delim) {
        StringBuilder sb = new StringBuilder();

        for (String string : lines) {
            sb.append(string);
            sb.append(delim);
        }

        return sb.toString();
    }
}

Related

  1. join(List c, String seperator)
  2. join(List command, List args)
  3. join(List elements)
  4. join(List items, char separator)
  5. join(List l, String joiner)
  6. join(List list)
  7. join(List list)
  8. join(List list)
  9. join(List list)