当前位置: 技术问答>java相关
char[] to string
来源: 互联网 发布时间:2015-01-30
本文导语: 用toString将char[]转换成string时,得到的不对呀,哪位知道? | String(char[] value) Allocates a new String so that it represents the sequence of characters currently contained in the character array...
用toString将char[]转换成string时,得到的不对呀,哪位知道?
|
String(char[] value)
Allocates a new String so that it represents the sequence of characters currently contained in the character array argument.
Allocates a new String so that it represents the sequence of characters currently contained in the character array argument.
|
char c[] = {1,2};
String s = new String(c);
String s = new String(c);
|
String to char[] use:
String.toCharArray()
char[] to String use:
new String(char[])
请问你是用什么类的toString方法转换的?
String.toCharArray()
char[] to String use:
new String(char[])
请问你是用什么类的toString方法转换的?