摘要: 如何创建字符串 最基本的方式 String str = "hello"; 因为字符串属于对象,所以和其它对象一样,可以使用关键字和构造方法来创建 String 对象。 String s2 = new String("hello"); 字符串的储存位置 String 创建的字符串存储在公共池中,而 n 阅读全文
posted @ 2020-12-18 18:24 MessiaX 阅读(120) 评论(0) 推荐(0) 编辑