public static void main(String[] args) {
String str="abcdefg";
char [] c=str.toCharArray();
for(char ch:c)//for-each循环输出每一个字符并且以\t分割开来
{
System.out.print(ch+"\t");
}
}
string s = "abc";
char[] c = s.ToCharArray();
public static void spitstring(string s)
{
char[] chars = new char[s.Length];
for (int i = 0; i < s.Length; i++)
{
chars[i] = (char)s[i];
}
}