展开全部
调用CharArray()方法 例如
String a = "qweradsf";
char[] c =a.CharArray();
这个方法就是将字符串中的字符一个一个添加进去
String a = "qweradsf";
char[] c =a.CharArray();
这个方法就是将字符串中的字符一个一个添加进去
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
String str="abcdefg";
char[] a=str.CharArray();
以下是说明:
public char[] toCharArray()
Converts this string to a new character array.
Returns:
a newly allocated character array whose length is the length of this string and whose contents are initialized to contain the character sequence represented by this string.
char[] a=str.CharArray();
以下是说明:
public char[] toCharArray()
Converts this string to a new character array.
Returns:
a newly allocated character array whose length is the length of this string and whose contents are initialized to contain the character sequence represented by this string.
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2011-01-13
展开全部
如果不知道转换函数的话,可以一个一个赋值
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询