tring s=“Price is” +x;
三个字符串对象,都在常量池
Double x=9.987;
Double y=1;
System.out.println(“”+x+y);
五个字符串对象,””, x, y, ””+x, ””+x+y
X+y+””
三个字符串对象 x+y x+y+”” ””
tring s=“Price is” +x;
三个字符串对象,都在常量池
Double x=9.987;
Double y=1;
System.out.println(“”+x+y);
五个字符串对象,””, x, y, ””+x, ””+x+y
X+y+””
三个字符串对象 x+y x+y+”” ””