开发者

How can I convert a String to a char array?

Is there any function to do this kind 开发者_运维技巧of job or do one have to parse each char and add it to the array?


Use String#toCharArray().

char[] chars = "some string".toCharArray();


"read java docs".toCharArray();


Use the String.toCharArray() method.


Use the String.getChars() method.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜