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
๐ŸŒ
BeginnersBook
beginnersbook.com โ€บ 2015 โ€บ 05 โ€บ java-string-to-arraylist-conversion
Java โ€“ How to Convert a String to ArrayList
September 20, 2022 - 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); } } } ... Note: In the above example, the delimiter is comma however we can split the string based on any delimiter. For example: if the string is โ€œhello hi namaste byeโ€ then we can split the string using whitespace as delimiter like this โ€“
๐ŸŒ
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.in โ€บ java โ€บ examples โ€บ convert-string-to-arraylist
Java Program to Convert String to ArrayList - W3schools
Splitting the string by using Java split() method and storing the substrings into an array. Creating an ArrayList while passing the substring reference to it using Arrays.asList() method.
๐ŸŒ
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<>(); for (String string : msg) { list.add(string); } System.out.println(list); Save the changes to your file and compile the code: ... [labex.io, ...
๐ŸŒ
TutorialKart
tutorialkart.com โ€บ java โ€บ string-array-to-arraylist-in-java
How to Convert String Array to ArrayList? Examples
May 4, 2023 - To convert String Array to ArrayList<String> in Java, we can use for loop or Arrays Class.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ java โ€บ convert-a-string-to-a-list-of-characters-in-java
Convert a String to a List of Characters in Java - GeeksforGeeks
1 month ago - Create an empty ArrayList. Traverse the String using a loop. Get each character using charAt(). Add the character to the List.
Find elsewhere
๐ŸŒ
Sentry
sentry.io โ€บ sentry answers โ€บ java โ€บ create arraylist from array in java
Java Create ArrayList from Array with Arrays.asList | Sentry
2 weeks ago - You want to convert your standard ... convert to an ArrayList is to use the built-in method in the Java Arrays library: Arrays.asList(array)....
๐ŸŒ
Coderanch
coderanch.com โ€บ t โ€บ 512522 โ€บ java โ€บ Convert-String-ArrayList-Long
Convert String [] to ArrayList<Long> () (Java in General forum at Coderanch)
Turning an ArrayList<String> into a String[] - not a problem. But because you need to convert each String into a Long you have no other option than to use a loop. Actually, all solutions include a loop. The loop may be hidden for you (e.g.
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ convert-an-arraylist-of-string-to-a-string-array-in-java
Convert an ArrayList of String to a String array in Java
import java.util.*; public class Demo { public static void main(String[] args) { ArrayList<String> arrList = new ArrayList<String>(); arrList.add("Bentley"); arrList.add("Audi"); arrList.add("Jaguar"); arrList.add("Cadillac"); arrList.add("Mazda"); arrList.add("Land Rover"); arrList.add("Porsche"); int size = arrList.size(); String res[] = arrList.toArray(new String[size]); System.out.println("String Array..."); for(String s: res) { System.out.println(s); } } }
๐ŸŒ
Baeldung
baeldung.com โ€บ home โ€บ java โ€บ java string โ€บ convert a comma separated string to a list in java
Convert a Comma Separated String to a List | Baeldung
September 3, 2025 - Then, weโ€™ll convert each string in our new array to an integer and add it to our list: String[] convertedRankArray = ranks.split(","); List<Integer> convertedRankList = new ArrayList<Integer>(); for (String number : convertedRankArray) { ...
๐ŸŒ
Coderanch
coderanch.com โ€บ t โ€บ 40 โ€บ 379449 โ€บ java โ€บ String-array-arraylist
String array to arraylist (Java in General forum at Coderanch)
June 7, 2012 - Ernest's solution: new ArrayList(Arrays.asList(myArray)); copies the content of the array to a new ArrayList. The copy is ofcourse independent of the array, and you can add, remove etc. elements as you like. Janarthan's solution, with Collections.addAll(myList, myStringArray); is essentially ...
๐ŸŒ
Java4s
java4s.com โ€บ how to convert string array to list in java
How to Convert String Array to List in Java
October 23, 2016 - Java convert string array to list example, This article will describe how to convert Java string to list or Arraylist. Arrays.asList() to convert string to list in java
๐ŸŒ
Mkyong
mkyong.com โ€บ home โ€บ java โ€บ java โ€“ convert arraylist to string[]
Java - Convert ArrayList<String> to String[] - Mkyong.com
April 23, 2019 - package com.mkyong; import java.util.ArrayList; import java.util.List; public class StringArrayExample { public static void main(String[] args) { List<String> list = new ArrayList<>(); list.add("A"); list.add("B"); list.add("C"); // default, returns Object[], not what we want, // Object[] objects = list.toArray(); // all jdk String[] str = list.toArray(new String[0]); for (String s : str) { System.out.println(s); } } }
๐ŸŒ
UiPath Community
forum.uipath.com โ€บ learning hub โ€บ academy feedback
String to ArrayList - Academy Feedback - UiPath Community Forum
September 20, 2019 - hi guys, i want to convert a string with value โ€œ123, 456, 789โ€ into an array list of {โ€œ123โ€, โ€œ456โ€, โ€œ789โ€} what code should i use to achieve that?
๐ŸŒ
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 ...
๐ŸŒ
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:
๐ŸŒ
Baeldung
baeldung.com โ€บ home โ€บ java โ€บ java list โ€บ convert an arraylist of object to an arraylist of string elements
Convert an ArrayList of Object to an ArrayList of String Elements | Baeldung
March 7, 2025 - In the following code, we iterate through the given list using a for-each loop and explicitly convert every object to a String by calling toString() on it: List<String> outputList = new ArrayList<>(inputList.size()); for(Object obj : inputList){ ...