易百教程

156、下面的代码将创建多少个对象?

String s = new String("Welcome");

两个对象:一个在字符串常量池中,另一个在非池(堆)中。