How to convert String to Character array in Java

October 16, 2017

Using ArrayUtils

If you are familiar with Apache Commons you can try this code:
The toCharArray() method will converts the String to char array. The ArrayUtils.toObject(String) method to converts the array of chars to the array of Character objects.

Own method

If for some reason you don’t want to use the Apache solution, you can write your own method.

Click here to add a comment

Leave a comment: