如何从底层逻辑理解: String s1 = new String("hello"); String s2 = "hello";的区别 前者在使用时创建了两个对象,一个在堆内存中,一个在方法区中 new的含义是实例化,狗类 阿黄=new 狗类();意思是:阿黄是狗类这种类,同时他的名字叫做阿黄。 String s1 = "hello,world" String s2="h
专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]
Copyright (C)ICode9.com, All Rights Reserved.
ICode9版权所有