Use this:

String str = "testString";
char[] charArray = str.toCharArray();
Character[] charObjectArray = ArrayUtils.toObject(charArray);
Answer from Kuldeep Jain on Stack Overflow
🌐
W3Schools
w3schools.com › java › ref_string_tochararray.asp
Java String toCharArray() Method
Java Examples Java Videos Java ... Syllabus Java Study Plan Java Interview Q&A ... The toCharArray() method returns a new char array representing the contents of the string....
🌐
GeeksforGeeks
geeksforgeeks.org › java › convert-a-string-to-character-array-in-java
Convert a String to Character Array in Java - GeeksforGeeks
Note: We can use the charAt() method, that returns the character at the specified index of a string., where the index is zero-based. Java Streams provide a functional way to convert a string into characters and process them for modern Java applications.
Published: July 12, 2025
🌐
DigitalOcean
digitalocean.com › community › tutorials › string-char-array-java
String to Char Array in Java: Conversion Methods | DigitalOcean
August 3, 2022 - Convert String to char array in Java using toCharArray(), charAt(), and getChars(). Complete guide with examples and use cases for string manipulation.
🌐
Tutorialspoint
tutorialspoint.com › java › lang › string_tochararray.htm
Java - String toCharArray() Method
The Java String toCharArray() method is used to convert the current string to a character array. This method returns a newly formed character array with a length equal to the given string and with the characters in the given string initialized as
🌐
freeCodeCamp
freecodecamp.org › news › string-to-char-array-java-tutorial
String to Char Array Java Tutorial
March 22, 2021 - I just showed you another way of converting a string to a character array, but we can use the toCharArray() method to easily convert instead of creating loops and iterating them.
🌐
freeCodeCamp
freecodecamp.org › news › string-to-array-in-java-how-to-convert-a-string-to-an-array-in-java
String to Array in Java – How to Convert Strings to Arrays
July 6, 2023 - Knowing how to use these methods will enable you to select the one that best suits your programming requirements. The toCharArray() method is a built-in function in Java that allows you to convert a string into a character array.
🌐
Edureka Community
edureka.co › home › community › categories › java › how to convert string to char array in java
How to convert string to char array in Java | Edureka Community
October 27, 2023 - In Java programming, what is the recommended method for converting a String object into an array ... in which this conversion might be necessary ?
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › java › java-string-tochararray-example
Java String toCharArray() Method With Example - GeeksforGeeks
July 11, 2025 - In Java, the toCharArray() method of the String class converts the given string into a character array. The returned array length is equal to the length of the string.
🌐
Vultr Docs
docs.vultr.com › java › standard library › java › lang › string › tochararray()
Java String toCharArray() - Convert To Char Array | Vultr Docs
January 1, 2025 - The toCharArray() method belongs to the String class in Java and is used to convert a given string into a new character array.
🌐
Career Karma
careerkarma.com › blog › java › how to convert a java string to char array
How to Convert a Java String to Char Array
December 1, 2023 - The toCharArray() method converts a string to a char array in Java. This method lets you manipulate individual characters in a string as list items.
🌐
Scaler
scaler.com › home › topics › convert java string to character array
Convert Java String to Character Array - Scaler Topics
May 4, 2023 - Then, we are creating a char array of string length using the length() method, in which we will store all the characters of the String. Then we are copying character by character, which we are fetching by the charAt() method, into an array using for loop. Then we are printing the elements of ...
🌐
GeeksforGeeks
geeksforgeeks.org › java › how-to-convert-a-string-to-a-character-in-java
How to Convert a String to a Character in Java? - GeeksforGeeks
July 23, 2025 - There are 3 other methods using which we can convert a String to a char in Java. We can use the charAt() method in a loop to extract all characters from a string and then we can store them in a character array.
🌐
Mkyong
mkyong.com › home › java › java – how to convert string to char array
Java – How to convert String to Char Array | mkyong.com
July 27, 2016 - package com.mkyong.utils; public class StringToCharArray { public static void main(String[] args) { String password = "password123"; char[] passwordInCharArray = password.toCharArray(); for (char temp : passwordInCharArray) { System.out.println(temp); } } } ... package com.mkyong.utils; package com.mkyong.pageview; public class Test { public static void main(String[] args) { String password = "password123"; password.chars() //IntStream .mapToObj(x -> (char) x)//Stream<Character> .forEach(System.out::println); } }
🌐
Baeldung
baeldung.com › home › java › java string › convert string to char in java
Convert String to char in Java | Baeldung
January 8, 2024 - We’ll convert the source String to a char array that holds each character in the string. In this way, we can pick any elements according to the requirement. ... So next, let’s see them in action. Java’s String class provides the charAt() to get the n-th character (0-based) from the input string as char.
🌐
Programiz
programiz.com › java-programming › library › string › tochararray
Java String toCharArray() | Programiz
March 12, 2024 - The Java String toCharArray() method converts the string to a char array and returns it.
🌐
Medium
medium.com › @AlexanderObregon › javas-string-tochararray-method-explained-4434d3ee3592
Java’s String toCharArray() Method Explained
June 24, 2024 - The toCharArray() method in Java is a fundamental utility provided by the String class, which serves to convert a string into a new character array. This method plays a crucial role in various string manipulation tasks, making it a valuable ...
🌐
W3Schools
w3schools.com › java › java_howto_string_to_array.asp
Java How To Convert a String to an Array
Explanation: The method toCharArray() turns the string into an array of characters.