Java char array to String

Java char array to String

The construction method of string is clearly written:
insert image description here
the general usage is:

//这样就从char数组变为了字符串
char st[]=new char[20];
String str=new String(st);

Guess you like

Origin blog.csdn.net/weixin_43732022/article/details/109075794