JAVA 中字符串的长度

编译期: 字符串的最大长度65535 即 String str = “abcd…∞” 如果字符串长度超过65535 编译不通过
运行期 基本不限制,大约4个G
参考: https://www.zhihu.com/question/347048181

Guess you like

Origin blog.csdn.net/xy3233/article/details/117534057