How to Convert a String to ArrayList in Java? Last Updated : 19 Jan, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report Converting String to ArrayList means each character of the string is added as a separator character element in the ArrayList. Example: Input: 0001 Output: 0 0 0 1 Input: Geeks Output: G e e k s We can easily convert String to ArrayList in Java using the split() method and regular expression. Parameters: regex - a delimiting regular expressionLimit - the resulting threshold Returns: An array of strings computed by splitting the given string. Throws: PatternSyntaxException - if the provided regular expression’s syntax is invalid. Approach: Splitting the string by using the Java split() method and storing the substrings into an array.Creating an ArrayList while passing the substring reference to it using Arrays.asList() method. Java // Java program to convert String to ArrayList import java.util.ArrayList; import java.util.Arrays; public class Main { public static void main(String[] args) { String str = "Geeks"; // split string by no space String[] strSplit = str.split(""); // Now convert string into ArrayList ArrayList<String> strList = new ArrayList<String>( Arrays.asList(strSplit)); // Now print the ArrayList for (String s : strList) System.out.println(s); } } OutputG e e k s Comment More infoAdvertise with us Next Article How to Convert Character Array to String in Java? 3rror404 Follow Improve Article Tags : Java Java-Strings Java-ArrayList Practice Tags : JavaJava-Strings Similar Reads How to Convert Character Array to String in Java? Strings are defined as an array of characters. The difference between a character array and a string is the string is terminated with a special character "\0". A character array can be converted to a string and vice versa. In this article, we will discuss how to convert a character array to a string 4 min read How to Convert HashMap to ArrayList in Java? In Java a HashMap is a collection that stores key-value pairs on the other hand, an ArrayList is a collection that stores dynamic arrays. There are some scenarios where we need to convert a HashMap into an ArrayList such as:Extracting only the keys or values in the list form.Converting key-value pai 2 min read How to Convert Vector to Array in Java? As we all know an array is a group of liked-typed variables that are referred to by a common name while on the other hand vectors basically fall in legacy classes but now it is fully compatible with collections. It is found in java.util package and implement the List interface which gives a superior 3 min read How to convert LinkedList to Array in Java? Given a Linked List in Java, the task is to convert this LinkedList to Array. Examples: Input: LinkedList: ['G', 'e', 'e', 'k', 's'] Output: Array: ['G', 'e', 'e', 'k', 's'] Input: LinkedList: [1, 2, 3, 4, 5] Output: Array: [1, 2, 3, 4, 5] Approach: Get the LinkedListConvert the LinkedList to Object 2 min read Convert Vector to ArrayList in Java There are multiple ways to convert vector to ArrayList, using passing the Vector in ArrayList constructor and by using simple vector traversal and adding values to ArrayList. Approach 1: Create a Vector.Add some values in Vector.Create a new ArrayList.Traverse vector from the left side to the right 3 min read How to Get ArrayList from Stream in Java 8? Given a Stream, the task is to convert this Stream into ArrayList in Java 8. Examples:Input: Stream: [1, 2, 3, 4, 5]Output: ArrayList: [1, 2, 3, 4, 5]Input: Stream: ['G', 'e', 'e', 'k', 's']Output: ArrayList: ['G', 'e', 'e', 'k', 's']1. Using Collectors.toList() method: Approach:Get the Stream to be 2 min read Like