一、构造常用的
 1.new String(“111”);------创建一个string对象
 2.new String(char value[]);------把字符数组转成一个string对象
 3.new String(byte bytes[]);------把字节数组转成一个string对象
二、方法本身
 getBytes();string对象转成字节数组
 toCharArray();string对象转成字符数组
string类常用方法
阅读 210
2022-02-26
一、构造常用的
 1.new String(“111”);------创建一个string对象
 2.new String(char value[]);------把字符数组转成一个string对象
 3.new String(byte bytes[]);------把字节数组转成一个string对象
二、方法本身
 getBytes();string对象转成字节数组
 toCharArray();string对象转成字符数组
相关推荐
精彩评论(0)