如题所述
第1个回答 2009-03-06
public class Test {
public static void main(String[] args) {
String str = "asfewgt";
char[] ch = str.toCharArray();
for (int i = 0; i < ch.length; i++) {
System.out.print(String.valueOf(ch[i]) + '\t');
}
}
}本回答被提问者和网友采纳
public static void main(String[] args) {
String str = "asfewgt";
char[] ch = str.toCharArray();
for (int i = 0; i < ch.length; i++) {
System.out.print(String.valueOf(ch[i]) + '\t');
}
}
}本回答被提问者和网友采纳
第2个回答 2009-03-06
这样可以:
public class Print {
public static void main(String[] args) {
String s = "dfjlskdf";
char [] ss = s.toCharArray();
}
}
public class Print {
public static void main(String[] args) {
String s = "dfjlskdf";
char [] ss = s.toCharArray();
}
}
第3个回答 2009-03-06
String str = "abcdefg";
char[] cha = str.toCharArray();
char[] cha = str.toCharArray();
第4个回答 2009-03-06
String str = "123";
char [] chs = str.toCharArray();
char [] chs = str.toCharArray();
第5个回答 2009-03-06
干嘛去了,赶紧结贴啊。浪费我时间