Try something like

List<String> myList = new ArrayList<String>(Arrays.asList(s.split(",")));
  • Arrays.asList documentation
  • String.split documentation
  • ArrayList(Collection) constructor documentation

Demo:

String s = "lorem,ipsum,dolor,sit,amet";

List<String> myList = new ArrayList<String>(Arrays.asList(s.split(",")));

System.out.println(myList);  // prints [lorem, ipsum, dolor, sit, amet]
Answer from aioobe on Stack Overflow
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ java โ€บ how-to-convert-a-string-to-arraylist-in-java
How to Convert a String to ArrayList in Java? - GeeksforGeeks
July 23, 2025 - We can easily convert String to ArrayList in Java using the split() method and regular expression.
๐ŸŒ
W3Schools
w3schools.com โ€บ java โ€บ java_arraylist.asp
Java ArrayList
To use an ArrayList, you must first import it from java.util: Create an ArrayList object called cars that will store strings:
๐ŸŒ
BeginnersBook
beginnersbook.com โ€บ 2015 โ€บ 05 โ€บ java-string-to-arraylist-conversion
Java โ€“ How to Convert a String to ArrayList
September 20, 2022 - We are splitting the string based on comma (,) as delimiter to get substrings. These substrings are assigned to ArrayList as elements. import java.util.ArrayList; import java.util.List; import java.util.Arrays; public class JavaExample { public static void main(String args[]){ String num = "22,33,44,55,66,77"; String str[] = num.split(","); List<String> al = new ArrayList<String>(); al = Arrays.asList(str); for(String s: al){ System.out.println(s); } } }
๐ŸŒ
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 - In this tutorial, weโ€™ll explore how to accomplish this conversion seamlessly using Javaโ€™s built-in methods and techniques. An example can help us to understand the problem quickly. Letโ€™s say we have the following ArrayList, which contains some artistsโ€™ names: static final List<String> INPUT_LIST = Lists.newArrayList("Michael Bolton", "Michael Jackson", "Guns and Roses", "Bryan Adams", "Air Supply");
๐ŸŒ
LabEx
labex.io โ€บ tutorials โ€บ java-convert-string-to-arraylist-117427
Convert String to ArrayList in Java | LabEx
String msg = "labex.io/tutorial/java/string"; ArrayList<String> list = new ArrayList<>(Arrays.asList(msg.split("/"))); System.out.println(list); If we have an array of strings, we can directly pass it into the asList() method to get an ArrayList.
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ how-to-get-arraylist-string-to-arraylist-object-and-vice-versa-in-java
How to get ArrayList&lt;String&gt; to ArrayList&lt;Object&gt; and vice versa in java?
Using wild cards, you can convert ArrayList<String> to ArrayList<Object> as โˆ’ ยท ArrayList<String> stringList = (ArrayList<String>)(ArrayList<?>)(list); import java.util.ArrayList; import java.util.Iterator; import java.util.ListIterator; public class ArrayListExample { public static void main(String args[]) { //Instantiating an ArrayList object ArrayList<Object> list = new ArrayList<Object>(); //populating the ArrayList list.add("apples"); list.add("mangoes"); list.add("oranges"); //Converting the Array list of object type into String type ArrayList<String> stringList = (ArrayList<String>)(ArrayList<?>)(list); //listing the contenmts of the obtained list Iterator<String> it = stringList.iterator(); while(it.hasNext()) { System.out.println(it.next()); } } }
Find elsewhere
๐ŸŒ
Coderanch
coderanch.com โ€บ t โ€บ 379449 โ€บ java โ€บ String-array-arraylist
String array to arraylist (Java in General forum at Coderanch)
2. Convert the array to a list? Why can't I do this all in one statement? You can do it in one statement: ... If that's your question, then the answer is: Because arrays are part of the Java language and as such, they get special language-level treatment (kind of like Strings do). The Collections Framework (including ArrayList...
๐ŸŒ
Programiz
programiz.com โ€บ java-programming โ€บ examples โ€บ arraylist-string-conversion
Java Program to Convert the ArrayList into a string and vice versa
To learn more, visit Java String join(). import java.util.ArrayList; import java.util.Arrays; class Main { public static void main(String[] args) { // create a string String str = "Java, JavaScript, Python"; System.out.println("String: " + str); // convert the string into an array String[] arr = str.split(","); // create an arraylist from the string ArrayList<String> languages = new ArrayList<>(Arrays.asList(arr)); System.out.println("ArrayList: " + languages); } }
๐ŸŒ
LabEx
labex.io โ€บ tutorials โ€บ java-how-to-split-a-string-into-an-arraylist-using-a-delimiter-in-java-415655
How to split a string into an ArrayList using a delimiter in Java | LabEx
This example demonstrates how to convert a string array to an ArrayList and showcases one of the advantages of using an ArrayList: the ability to easily add new elements to the collection. Note the differences between arrays and ArrayLists: Arrays have a fixed size, while ArrayLists can grow dynamically ยท ArrayLists provide methods like add(), remove(), and get() for manipulating elements ยท ArrayLists can only store objects, not primitive types (though Java automatically handles the conversion using autoboxing)
๐ŸŒ
Sentry
sentry.io โ€บ sentry answers โ€บ java โ€บ create arraylist from array in java
Create ArrayList from array in Java | Sentry
List<String> list = new ArrayList<>(Arrays.asList(array)); The code above will create a new ArrayList instance and use the data from our original array to populate its initial values.
๐ŸŒ
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 ... an ArrayList into a string. Explore the default behavior of this method and how to customize it to suit specific formatting needs. Understand how this method can be used in practical scenarios to enhance data handling and representation in Java ...
๐ŸŒ
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 - Convert ArrayList to Object array using toArray() method. Iterate and convert each element to the desired type using typecasting. Here it is converted to String type and added to the string array.
๐ŸŒ
Dot Net Perls
dotnetperls.com โ€บ convert-arraylist-string-java
Java - Convert ArrayList to String - Dot Net Perls
Sometimes we want to combine just the strings in an ArrayList, with no delimiters between them. We use an empty string literal as the delimiter. import java.util.ArrayList; public class Program { public static void main(String[] args) { // Append three Strings to the ArrayList.
๐ŸŒ
Spiceworks
community.spiceworks.com โ€บ programming & development
to convert string into arraylist - Programming & Development - Spiceworks Community
October 5, 2008 - Hi, I need a java code to convert string into Arraylist.Reply me as soon as you can.Thanks.
๐ŸŒ
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 - Convert the ArrayList to a String using the toString() method. ... import java.util.ArrayList; public class Main { public static void main(String[] args) { ArrayList<String> list = new ArrayList<>(); list.add("Java"); list.add("Python"); ...
๐ŸŒ
Studytonight
studytonight.com โ€บ java-examples โ€บ how-to-convert-string-to-arraylist-in-java
How to Convert String to ArrayList in Java - Studytonight
January 27, 2021 - Here, we are using the split() method to get an array of strings and then converting this array into a list using the asList() method. import java.util.ArrayList; import java.util.Arrays; public class Main { public static void main(String[] ...