Java List to String toString(List list)

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

Description

to String

License

LGPL

Declaration

public static String toString(List<?> list) 

Method Source Code

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

import java.util.List;

public class Main {
    public static String toString(List<?> list) {
        String s = "";
        for (int i = 0; i < list.size(); i++) {
            if (i > 0)
                s += ", ";
            Object o = list.get(i);
            s += o.toString();//from   w  ww .ja  v  a2 s  .  co  m
        }
        return s;
    }
}

Related

  1. toString(List list)
  2. toString(List objects)
  3. toString(List col)
  4. toString(List coll, char delimiter)
  5. toString(List list)
  6. toString(List list)
  7. toString(List list)
  8. toString(List list, char sep)
  9. toString(List list, String separator)