JAVA中字符串转成字符串数组格式

String类型的数据转为byte数组:

String str=""qwertyuiop;

byte [] bytes=str.getBytes();

byte字节类型转为String类型数据:

String str=""qwertyuiop;

byte [] bytes=str.getBytes();

String st=new String(bytes);

猜你喜欢

转载自blog.csdn.net/qq_40001362/article/details/82182081