Java List to String toString(List list, String split)

Here you can find the source of toString(List list, String split)

Description

to String

License

Apache License

Declaration

public static String toString(List<String> list, String split) 

Method Source Code


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

import java.util.List;

public class Main {
    public static String toString(List<String> list, String split) {
        StringBuffer sbuf = new StringBuffer();
        for (int i = 0; i < list.size(); i++) {
            if (i > 0) {
                sbuf.append(split);/*from   w ww  .  j  ava  2  s  .c  o m*/
            }
            sbuf.append(list.get(i));
        }
        return sbuf.toString();
    }
}

Related

  1. toString(List listOriginal)
  2. toString(List input, String sep)
  3. toString(List list)
  4. toString(List list)
  5. toString(List list, String delimiter)
  6. toString(List strings)
  7. toString(List strings)
  8. toString(List list)
  9. toString(List list)

  10. HOME | Copyright © www.java2s.com 2016