DONE将字符数组转化为字符串,对吗?
//将字符数组转化为字符串,对吗?
public class String {
public static void main(String[] args){
char[] h={'h','e','l','l','o'};
String a=new String(h);
}
}
我在别处看到
public class String {
public static void main(String[] args){
char data[] = {'a', 'b', 'c'};
String str = new String(data);
}
}
但我在eclipse上运行出错~~
[此贴子已经被作者于2007-10-1 11:33:27编辑过]
----------------解决方案--------------------------------------------------------
同一问题:String是类库类名!
----------------解决方案--------------------------------------------------------