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 › convert-a-string-to-a-list-of-characters-in-java
Convert a String to a List of Characters in Java - GeeksforGeeks
November 22, 2024 - In this example, we will use the toCharArray() method to convert a String into a character array. Then we will convert that array into a list using Java Streams.
Discussions

arrays - Java: How to convert String[] to List or Set - Stack Overflow
How to convert String[] (Array) to Collection, like ArrayList or HashSet? More on stackoverflow.com
🌐 stackoverflow.com
java - Best way to convert an ArrayList to a string - Stack Overflow
Documentation link: docs.oracle.com/javase/8/docs/api/java/util/stream/… 2019-10-15T22:23:39.607Z+00:00 ... @RafaelMiquelino, I was mistaken. the stream will honor whatever the order of the source. In this case, ArrayList is guaranteed to be ordered`. 2019-10-16T14:48:48.313Z+00:00 ... Save this answer. ... Show activity on this post. If you happen to be doing this on Android, there is a nice utility for this called TextUtils which has a .join(String delimiter, Iterable) method. List... More on stackoverflow.com
🌐 stackoverflow.com
Converting String array to java.util.List - Stack Overflow
How do I convert a String array to a java.util.List? More on stackoverflow.com
🌐 stackoverflow.com
String Templates. Then What?
I'm aware that the String Template JEP is still in the early phase. You are aware that they have been pulled completely for now? More on reddit.com
🌐 r/java
64
21
February 9, 2025
🌐
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 - ... // Java program to convert ... = str.split(""); // Now convert string into ArrayList ArrayList<String> strList = new ArrayList<String>( Arrays.asList(strSplit)); // Now print the ArrayList for (String s : strList) ...
🌐
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 a comma separated string to a list in java
Convert a Comma Separated String to a List in Java
September 3, 2025 - First, we’ll split our string into an array of strings using split, a String class utility method. Then, we’ll use Arrays.asList on our new array of strings to convert it into a list of strings:
🌐
KapreSoft
kapresoft.com › java › 2023 › 10 › 19 › java-string-to-list.html
Java • Converting Strings To List | KapreSoft
October 19, 2023 - In this case, the split() method uses a regular expression to split the string into a list, excluding any special characters. In scenarios where you’re dealing with large strings and performance is a concern, Java’s Stream.parallel() can ...
🌐
Medium
medium.com › @AlexanderObregon › turning-a-string-into-a-list-of-words-in-java-c1e4bd85cad8
Turning a String into a List of Words in Java | Medium
July 28, 2025 - If you prefer a more compact way to write that filtering step, Java’s stream API lets you handle it in a single line while keeping things readable. Streams turn arrays or collections into pipelines, where each item flows through a series of operations. Here’s a version that matches the manual loop above: List<String> filteredWords = Arrays.stream(words) .map(String::trim) .filter(s -> !s.isEmpty()) .collect(Collectors.toList());
Find elsewhere
🌐
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. ... import java.util.ArrayList; import java.util.List; import java.util.Arrays; public class StringtoArrayList ...
🌐
Baeldung
baeldung.com › home › java › java string › convert a string to a list of characters in java
Convert a String to a List of Characters in Java | Baeldung
March 7, 2025 - Following that, wе itеratе through this charactеr array, systеmatically populating a List<Charactеr> namеd charList to еffеctivеly rеprеsеnt еach charactеr from thе original string. To validatе thе accuracy of this convеrsion, an assеrtion is thеn utilizеd to еnsurе thе еquality of lеngths bеtwееn thе original inputString and thе rеsult charList. With thе advеnt of Java 8, wе can lеvеragе strеams to achiеvе thе convеrsion in a morе concisе and functional mannеr.
🌐
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
🌐
javaspring
javaspring.net › blog › string-to-list-java
Converting Strings to Lists in Java: A Comprehensive Guide — javaspring.net
In this example, the StringTokenizer is created with the string and the delimiter ,. Then, the tokens are added to the list one by one. The Java Stream API provides a more functional way to convert a string to a list.
🌐
LabEx
labex.io › tutorials › java-convert-string-to-arraylist-117427
Convert String to ArrayList in Java | LabEx
If we have an array of strings, we can directly pass it into the asList() method to get an ArrayList. Add the following code inside the main() method: String[] msg = {"labex.io","tutorial","java","string"}; ArrayList<String> list = new ...
🌐
GeeksforGeeks
geeksforgeeks.org › java › program-to-convert-list-of-string-to-list-of-integer-in-java
Program to convert List of String to List of Integer in Java - GeeksforGeeks
July 11, 2025 - Convert Stream of String to Stream of Integer. This is done using Stream.map() and passing Integer.parseInt() method as lambda expression. Collect Stream of Integer into List of Integer. This is done using Collectors.toList(). Return/Print the list of String. ... // Java Program to convert // List<String> to List<Integer> in Java 8 import java.util.*; import java.util.stream.*; class GFG { public static void main(String args[]) { // Create a list of String List<String> listOfString = Arrays.asList("1", "2", "3", "4", "5"); // Print the list of String System.out.println("List of String: " + listOfString); // Convert List of String to List of Integer List<Integer> listOfInteger = listOfString.stream() .map(Integer::valueOf) .collect(Collectors.toList()); // Print the list of Integer System.out.println("List of Integer: " + listOfInteger); } }
🌐
Attacomsian
attacomsian.com › blog › java-string-with-separator-to-list
Convert a comma-separated string to a list in Java
October 29, 2022 - In this article, we’ll look at three different methods to convert a string with a separator to a list. The String class in Java provides split() method to split a string into an array of strings.
🌐
Mkyong
mkyong.com › home › java › java 8 stream – convert list> to list
Java 8 Stream - Convert List<List<String>> to List<String> - Mkyong.com
July 18, 2019 - As title, we can use flatMap to convert it. ... package com.mkyong.test; import java.util.Arrays; import java.util.List; import java.util.Scanner; import java.util.stream.Collectors; public class Java9Example1 { public static void main(String[] args) { List<String> numbers = Arrays.asList("1", "2", "A", "B", "C1D2E3"); List<List<String>> collect = numbers.stream() .map(x -> new Scanner(x).findAll("\\D+") .map(m -> m.group()) .collect(Collectors.toList()) ) .collect(Collectors.toList()); collect.forEach(x -> System.out.println(x)); } }
🌐
Bukkit
bukkit.org › threads › how-to-convert-string-args-to-list-string.189033
How to convert String[] args to List<String> ? | Bukkit Forums
October 30, 2013 - All is in the title ^^ my code: List help = new List (args); But it don't work
🌐
Sentry
sentry.io › sentry answers › java › how to convert an array to a list in java?
How to convert an array to a List in Java? | Sentry
November 15, 2024 - The Arrays.asList() method is the simplest way to convert an array to a List. import java.util.Arrays; import java.util.List; public class Main { public static void main(String[] args) { String[] array = {"Apple", "Banana", "Cherry"}; List<String> ...