You need to add it like this.
String str = "abcd..."; ArrayList<Character> chars = new ArrayList<Character>(); for (char c : str.toCharArray()) { chars.add(c); }
Related Posts:
- How to convert a String into an ArrayList?
- How to avoid “ConcurrentModificationException” while removing elements from `ArrayList` while iterating it? [duplicate]
- Convert list to array in Java [duplicate]
- Best way to convert an ArrayList to a string
- Best way to convert an ArrayList to a string
- Why do I get an UnsupportedOperationException when trying to remove an element from a List?
- Add String Array to ArrayList
- Incompatible types List of List and ArrayList of ArrayList
- How to format strings in Java
- When to use LinkedList over ArrayList in Java?
- How to convert a char to a String?
- Reverse a string in Java
- Reverse a string in Java
- Java String Split by “|”
- Convert String to double in Java
- Java String new line
- Initialization of an ArrayList in one line
- How to avoid java.util.ConcurrentModificationException when iterating through and removing elements from an ArrayList
- How to check if a String contains another String in a case insensitive manner in Java?
- Java split string to array [duplicate]
- String concatenation: concat() vs “+” operator
- How to remove the last character from a string?
- Java string to date conversion
- How to replace � in a string
- Change date format in a Java string
- What are all the escape characters?
- What’s the C++ version of Java’s ArrayList
- Converting String to “Character” array in Java
- “Exception in thread “main” java.lang.IndexOutOfBoundsException: Index: 0, Size: 0″ with ArrayList?
- How to split a String by space
- Print ArrayList
- How can I prevent java.lang.NumberFormatException: For input string: “N/A”?
- How to remove single character from a String
- Array ArrayList python equivalent
- Java ArrayList copy
- How to parse this string in Java?
- How to convert any Object to String?
- How to split a string in Java
- Can I multiply strings in Java to repeat sequences?
- How to convert an ArrayList containing Integers to primitive int array?
- How to convert a Binary String to a base 10 integer in Java
- stale element reference: element is not attached to the page document
- Left Hand Side of an Assignment must be a Variable CharAt
- How to capitalize the first letter of a String in Java?
- Java way to check if a string is palindrome
- How do I apply the for-each loop to every character in a String?
- Java – removing first character of a string
- Explain the use of a bit vector for determining if all characters are unique
- Explain the use of a bit vector for determining if all characters are unique
- Sort a single String in Java
- HashSet vs. ArrayList
- Java ArrayList replace at specific index
- What is Java String interning?
- What is Java String interning?
- What is Java String interning?
- “Instantiating” a List in Java? [duplicate]
- How can I create an Array of ArrayLists?
- Create a List of primitive int?
- Using Enum values as String literals
- What is the easiest/best/most correct way to iterate through the characters of a string in Java?
- How to create an 2D ArrayList in java?
- java howto ArrayList push, pop, shift, and unshift
- List of Arrays in Java
- How to sort an array of objects in Java?
- How to compress a String in Java?
- java.lang.NumberFormatException: empty String
- How to check if a String is numeric in Java
- How to add an object to an ArrayList in Java
- Simple way to repeat a string
- Java end of file
- Unclosed Character Literal error
- StringIndexOutOfBoundsException String index out of range: 0
- difference between equals() and hashCode()
- How can I check if a single character appears in a string?
- Difference between String replace() and replaceAll()
- Java String to SHA1
- Replace a character at a specific index in a string?
- How to convert a String to CharSequence?
- How do I convert a String to a BigInteger?
- How can I remove a substring from a given String?
- How to write a test class to test my code?
- How to create a Multidimensional ArrayList in Java?
- How do I get the last character of a string?
- Cannot invoke toString() on the primitive type int
- How to compare character ignoring case in primitive types
- How to print out all the elements of a List in Java?
- Append a single character to a string or char array in java?
- How do I join two lists in Java?
- When to use a Map instead of a List in Java?
- How to insert multiple tabs string in java?
- Append a single character to a string or char array in java?
- String is immutable. What exactly is the meaning?
- Why cannot cast Integer to String in java?
- Removing double quotes from a string in Java
- Append a single character to a string or char array in java?
- Quotation marks inside a string
- ShoppingCart.Java Program Assignment
- How Do I Implement an Insertion Sort Method for A Generic ArrayList?
- toring and Retrieving ArrayList values from hashmap
- In Java, how do I parse XML as a String instead of a file?