In Java 8 or later:

String listString = String.join(", ", list);

In case the list is not of type String, a joining collector can be used:

String listString = list.stream().map(Object::toString)
                        .collect(Collectors.joining(", "));
Answer from Vitalii Fedorenko on Stack Overflow
๐ŸŒ
W3Schools
w3schools.com โ€บ java โ€บ java_arraylist.asp
Java ArrayList
Elements in an ArrayList are actually objects. In the examples above, we created elements (objects) of type "String". Remember that a String in Java is an object (not a primitive type). To use other types, such as int, you must specify an equivalent wrapper class: Integer.
๐ŸŒ
Programiz
programiz.com โ€บ java-programming โ€บ library โ€บ arraylist โ€บ tostring
Java ArrayList toString()
import java.util.ArrayList; class ... System.out.println("ArrayList: " + languages); // convert ArrayList to String String list = languages.toString(); System.out.println("String: " + list); } }...
๐ŸŒ
BeginnersBook
beginnersbook.com โ€บ 2013 โ€บ 12 โ€บ how-to-convert-arraylist-to-string-array-in-java
How to convert ArrayList to string array in java
Steps followed in this program are: 1. Create an array with the same size as the arraylist. The arraylist size can be found using size() method of ArrayList class. The statement String arr[] = new String[arrList.size()]; creates an array arr of string type with the same size as of arrList.
๐ŸŒ
Programiz
programiz.com โ€บ java-programming โ€บ examples โ€บ arraylist-string-conversion
Java Program to Convert the ArrayList into a string and vice versa
import java.util.ArrayList; class ... System.out.println("ArrayList: " + languages); // convert the arraylist into a string String arraylist = languages.toString(); System.out.println("String: " + arraylist); } }...
๐ŸŒ
Dot Net Perls
dotnetperls.com โ€บ convert-arraylist-string-java
Java - Convert ArrayList to String - Dot Net Perls
Result The ArrayList's contents ... main(String[] args) { // Create an ArrayList and add three strings to it. ArrayList<String> arr = new ArrayList<>(); arr.add("cat"); arr.add("dog"); arr.add("bird"); // Convert the ArrayList into a String....
๐ŸŒ
Vultr Docs
docs.vultr.com โ€บ java โ€บ examples โ€บ convert-the-arraylist-into-a-string-and-vice-versa
Java Program to Convert the ArrayList into a string and vice versa | Vultr Docs
December 19, 2024 - In this article, you will learn how to convert an ArrayList into a String and vice versa through clear examples. Explore practical use-cases and adapt these strategies to enhance data manipulation in your Java applications.
Find elsewhere
๐ŸŒ
Vultr
docs.vultr.com โ€บ java โ€บ standard-library โ€บ java โ€บ util โ€บ ArrayList โ€บ toString
Java ArrayList toString() - Convert To String | Vultr Docs
November 19, 2024 - In this article, you will learn how to leverage the toString() method to convert an ArrayList into a string. Explore the default behavior of this method and how to customize it to suit specific formatting needs.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ java โ€บ convert-an-arraylist-of-string-to-a-string-array-in-java
Convert an ArrayList of String to a String Array in Java - GeeksforGeeks
July 11, 2025 - In Java, as we all know ArrayList class is derived from the List interface. Here we are given an ArrayList of strings and the task is to convert the ArrayList to a string array.
๐ŸŒ
Blogger
javarevisited.blogspot.com โ€บ 2022 โ€บ 12 โ€บ 6-ways-to-convert-arraylist-to-string.html
6 Ways to convert ArrayList to String in Java - Example Tutorial
September 14, 2023 - The method we are using is nothing but accepts a Iterable and since ArrayList implements Iterable interface, we can use this method to join elements on ArrayList as delimited String. This method is also null safe and null objects or empty strings within the iteration are represented by empty strings. Google Guava is one of the famous general purpose library which deserve a place in every Java project.
๐ŸŒ
W3Schools
w3schools.com โ€บ java โ€บ java_ref_arraylist.asp
Java ArrayList Reference
How Tos Add Two Numbers Swap Two ... Number ArrayList Loop HashMap Loop Loop Through an Enum ... assert abstract boolean break byte case catch char class continue default do double else enum exports extends final finally float for if implements import instanceof int interface long module native new package private protected public return requires short static super switch synchronized this throw throws transient try var void volatile while Java String ...
๐ŸŒ
Coderanch
coderanch.com โ€บ t โ€บ 377381 โ€บ java โ€บ convert-ArrayList-Strings-String
convert an ArrayList of Strings into String[] ? (Java in General forum at Coderanch)
If you look at the documentation for the List interface, you will see that there is another version of toArray() that takes an array as the argument. This tells the List what type of objects it actually holds. If you are using Java 1.5, then you can do this: ... As a side note, your implentation is able to convert an ArrayList that stores anything into a String array.
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ article โ€บ how-to-create-a-string-from-a-java-arraylist
How to create a string from a Java ArrayList?
To convert the contents of an ArrayList to a String, create a StringBuffer object append the contents of the ArrayList to it, finally convert the StringBuffer object to String using the toString() method. import java.util.ArrayList; public class ...
๐ŸŒ
Programiz
programiz.com โ€บ java-programming โ€บ arraylist
Java ArrayList (With Examples)
We use the toString() method of the ArrayList class to convert an arraylist into a string. For example, import java.util.ArrayList; class Main { public static void main(String[] args) { ArrayList<String> languages = new ArrayList<>(); // add elements in the ArrayList languages.add("Java"); ...
๐ŸŒ
W3Schools
w3schools.com โ€บ java โ€บ java_howto_string_to_array.asp
Java How To Convert a String to an Array
How Tos Add Two Numbers Swap Two Variables Even or Odd Number Reverse a Number Positive or Negative Square Root Area of Rectangle Celsius to Fahrenheit Sum of Digits Check Armstrong Num Random Number Count Words Count Vowels in a String Remove Vowels Count Digits in a String Reverse a String Palindrome Check Check Anagram Convert String to Array Remove Whitespace Count Character Frequency Sum of Array Elements Find Array Average Sort an Array Find Smallest Element Find Largest Element Second Largest Array Min and Max Array Merge Two Arrays Remove Duplicates Find Duplicates Shuffle an Array Fac
๐ŸŒ
W3Schools
w3schools.com โ€บ java โ€บ tryjava.asp
W3Schools online JAVA editor
The W3Schools online code editor allows you to edit code and view the result in your browser