This post originated from an RSS feed registered with Java Buzz
by Arpit Mandliya.
Original Post: Java Convert List to String
Feed Title: Java tutorial for beginners
Feed URL: http://feeds.feedburner.com/arpitmandliyasblog
Feed Description: A blog about java programming language and its frameworks
In this post, we will see how to convert List to String in java. Following are the ways to convert list into String: Using StringBuilder We can use StringBuilder class to convert List to String.StringBuilder is a best approach if you have other than String Array,List.We can add elements in the object of StringBuilder using append method while looping and then convert it into string using toString() method of String class at the end. Example: OUTPUT: Elements of list are: Converted String is Mary,Martin,John,Newton, Using + operator This is not an efficient way so, normally avoid