从String中提取和存储字符

时间:2014-07-31 09:42:33

标签: java string char

我想编写一个程序来读取英文单词并将其存储在" char"形式是这样的:

"苹果" - > " A"," p"," p"," l"," e"

我该怎么做?

1 个答案:

答案 0 :(得分:0)

String a = "Apple";
char letters[] = a.toCharArray();