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
๐ŸŒ
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 - Fetch each element of the ArrayList one by one using get() method. Assigned each element into String Array using assignment(=) operator. Printing string array. ... // Java Program to Convert ArrayList to Array // using toArray() Method // Importing required classes import java.util.ArrayList; import java.util.Arrays; // Main class class GFG { // Main driver method public static void main(String[] args) { // Creating an empty ArrayList of string type ArrayList<String> al = new ArrayList<String>(); ...
Discussions

arrays - Converting 'ArrayList<String> to 'String[]' in Java - Stack Overflow
How might I convert an ArrayList object to a String[] array in Java? More on stackoverflow.com
๐ŸŒ stackoverflow.com
java - Convert ArrayList<String> to String[] array - Stack Overflow
In Java, generic type exists at compile-time only. At runtime information about generic type (like in your case ) is removed and replaced with Object type (take a look at type erasure). That is why at runtime toArray() have no idea about what precise type to use to create new array, so it uses Object as safest type, because each class extends Object so it can safely store instance of any class. Why? Take a look at this example ... More on stackoverflow.com
๐ŸŒ stackoverflow.com
Java: How to properly return String values from an ArrayList?
You have just returned an array. Returning an array returns the object, doesn't print it at all. For each variable in array, print to console variable For Java is something similar to this (look up for each loops) though you can achieve same thing using a standard for loop For (string objectName : arrayName) { System.out.print(objectName); } More on reddit.com
๐ŸŒ r/AskProgramming
6
2
March 12, 2018
How to put string into an arraylist
One important thing: you shouldn't use ArrayList, collections in System.Collections are mostly still present for backward compatibility reasons. You should use List from System.Collections.Generic. Even if you need to store items of the object type, List will still be a better choice than ArrayList. The same is true about Hashtable, you should use Dictionary instead. Also ArrayList[] a = new ArrayList(); isn't correct. You should write it without []. More on reddit.com
๐ŸŒ r/csharp
4
0
December 6, 2022
๐ŸŒ
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 ...rintln("ArrayList: " + languages); // convert the arraylist into a string String arraylist = String.join(", ", languages); System.out.println("String: " + arraylist); } } ... In the above example, we have used the join() method of the String ...
๐ŸŒ
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.
๐ŸŒ
BeginnersBook
beginnersbook.com โ€บ 2013 โ€บ 12 โ€บ how-to-convert-arraylist-to-string-array-in-java
How to convert ArrayList to string array in java
We are converting this arraylist ... main(String[] args) { //An ArrayList of integers ArrayList<Integer> numbers= new ArrayList<>(); numbers.add(11); numbers.add(22); numbers.add(33); numbers.add(44); numbers.add(55); // ArrayList to Array Conversion using toArray() Object ...
๐ŸŒ
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); } } Output ยท ArrayList: [Java, Python, C] String: [Java, Python, C] In the above example, ...
๐ŸŒ
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 - ... import java.util.ArrayList; ... input.split("\\s*;\\s*"); // Splits on semicolon and trims whitespace ArrayList<String> list = new ArrayList<>(Arrays.asList(items)); System.out.println(list); } } Explain Code ยท This example demonstrates ...
Find elsewhere
๐ŸŒ
Vultr
docs.vultr.com โ€บ java โ€บ standard-library โ€บ java โ€บ util โ€บ ArrayList โ€บ toString
Java ArrayList toString() - Convert To String | Vultr Docs
November 19, 2024 - Call the toString() method to convert the list into a string. ... import java.util.ArrayList; ArrayList<String> colors = new ArrayList<>(); colors.add("Red"); colors.add("Green"); colors.add("Blue"); String result = colors.toString(); System.out.println(result); ...
๐ŸŒ
Baeldung
baeldung.com โ€บ home โ€บ java โ€บ java string โ€บ convert an arraylist of string to a string array in java
Convert an ArrayList of String to a String Array in Java | Baeldung
March 7, 2025 - Finally, if we work with Java 11 or later, we can directly call Collection.toArray(generatorFunc) to get the converted array without converting the list to Stream first: String[] result = INPUT_LIST.toArray(String[]::new); assertArrayEquals...
๐ŸŒ
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. It provides common utility classes which can make your code simpler and easier to read, write, and test. Here is an example of Google Guava's Joiner class which can be used to convert a List to String in Java.
๐ŸŒ
Dot Net Perls
dotnetperls.com โ€บ convert-arraylist-string-java
Java - Convert ArrayList to String - Dot Net Perls
We use a comma delimiter. Result The ArrayList's contents are now represented in a string with comma character delimiters. import java.util.ArrayList; public class Program { public static void main(String[] args) { // Create an ArrayList and add three strings to it.
๐ŸŒ
Delft Stack
delftstack.com โ€บ home โ€บ howto โ€บ java โ€บ how to convert an arraylist to a string in java
How to Convert an Arraylist to a String in Java | Delft Stack
February 2, 2024 - The most straightforward and easy way to convert an ArrayList to String is to use the plus (+) operator. In String, the plus operator concatenates two string objects and returns a single object.
๐ŸŒ
Coderanch
coderanch.com โ€บ t โ€บ 377381 โ€บ java โ€บ convert-ArrayList-Strings-String
convert an ArrayList of Strings into String[] ? (Java in General forum at Coderanch)
July 31, 2005 - To add a little to Layne's comment: although the Javadocs show an example like this: String[] s = (String[]) list.toArray(new String[0]); it takes only a little more typing to do this: String[] s = (String[]) list.toArray(new String[list.size()]); In the first example, the zero-length array ...
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ how-to-create-a-string-from-a-java-arraylist
How to create a string from a Java ArrayList?
July 30, 2019 - import java.util.ArrayList; public ... al.add("you"); StringBuffer sb = new StringBuffer(); for (String s : al) { sb.append(s); sb.append(" "); } String str = sb.toString(); System.out.println(str); } } Hello are you ยท...
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ java โ€บ convert-arraylist-to-comma-separated-string-in-java
Convert ArrayList to Comma Separated String in Java - GeeksforGeeks
July 23, 2025 - In the below example, we used StringBuilder's append() method. The append method is used to concatenate or add a new set of characters in the last position of the existing string.