Java List to String listToString (final List l)

Here you can find the source of listToString (final List l)

Description

list To String

License

Apache License

Declaration

public static String listToString (final List<?> l)
    

Method Source Code

//package com.java2s;
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file

import java.util.Arrays;

import java.util.List;

public class Main {
    public static String listToString(final List<?> l) {
        return Arrays.toString(l.toArray());
    }//from w ww .  j  av  a 2  s.c o m

    /** Varargs wrapper */
    public static String toString(final Object... objects) {
        return Arrays.toString(objects);
    }
}

Related

  1. listToStr(Collection c, String delim)
  2. listToStr(List lst)
  3. listToStr(List list)
  4. listToStr(List stringList)
  5. listToStrArray(List list)
  6. listToString(Collection col)
  7. listToString(Collection l)
  8. listToString(final List list, final String separator)
  9. listToString(final List list)