I want to convert a String
to Character array but I couldn't make it. I can convert it to char array with toCharArray()
method but it doesn't be the same with Character array.
feedback
|
Use this String.toCharArray() and then use ArrayUtils.toObject(char[])
| |||||
feedback
|
You have to write your own method in this case. Use a loop and get each character using | ||||
feedback
|
Why not write a little method yourself?
| |||
feedback
|
| ||||
feedback
|
another way to do it.
| |||
feedback
|
I hope the code below will help you.
It's working and the output is:
| ||||
feedback
|
char
toCharacter
, useCharacter.valueOf(mychar)
. If it is an array, loop each element and convert. – ee. Apr 4 '12 at 6:50