String s = new String(“xyz”);创建了几个字符串对象?

两个对象一个是静态区的”xyz”,一个是用 new 创建在堆上的对象

posted @ 2020-07-05 13:51  咔啡  阅读(760)  评论(0编辑  收藏  举报