java学习part31String
142-常用类与基础API-String的理解与不可变性_哔哩哔哩_bilibili
1.String

2.字符串常量池
变更储存区的原因是加快被gc的频率
==比地址,equals比内容
3.字符串连接
s3s4都是字符串常量,后面几个会利用StringBuilder的toString(),里面会new字符串,所以地址不一样。
intern函数
3.2总结
4.String构造器
5.String转其他类型
5.1String-int-Integer
5.2String-char
5.3String-Byte
编码和解码要一致,默认utf-8
6.String常用方法
判断长度是否为0,如果是null会空指针