摘要: String结构剖析 //1.String 对象用于保存字符串,也就是一组字符序列 // 2. "jack" 字符串常量, 双引号括起的字符序列 // 3. 字符串的字符使用 Unicode 字符编码,一个字符(不区分字母还是汉字)占两个字节 // 4. String 类有很多构造器,构造器的重载 阅读全文
posted @ 2022-06-24 16:32 满阶梧童 阅读(47) 评论(0) 推荐(0)
摘要: 包装类转换 //包装类(Integer) -> String Integer i = 100;//自动装箱 //方式1 String str1 = i + "" ; System.out.println(str1); //方式2 String str2 = i.toString(); System. 阅读全文
posted @ 2022-06-21 11:59 满阶梧童 阅读(17) 评论(0) 推荐(0)