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

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

原文地址:https://www.cnblogs.com/programb/p/13019327.html