Java List Join join(List array, char c)

Here you can find the source of join(List array, char c)

Description

join

License

Open Source License

Declaration

public static String join(List<Integer> array, char c) 

Method Source Code

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

import java.util.List;

public class Main {
    public static String join(List<Integer> array, char c) {
        final StringBuilder sb = new StringBuilder();
        for (int value : array) {
            if (sb.length() > 0) {
                sb.append(c);/*from ww  w .ja v  a 2  s.co m*/
            }
            sb.append(Integer.toString(value));
        }
        return sb.toString();
    }
}

Related

  1. join(List objects, String delimiter)
  2. join(List parts)
  3. join(List resultList, String sep)
  4. join(List strings, String delimiter)
  5. join(List list1, List list2)
  6. join(List list, String separator)
  7. join(List recycled)
  8. join(List list)
  9. join(List list)

    HOME | Copyright © www.java2s.com 2016