java中string类型是什么意思

如题所述

String是字符串类型,他是一个对象,在java中,比如:
String s="hello";创建了一个字符串常量s,赋值为hello
String ss = new String("hello");
创建了一个String对象ss,这个对象的引用是ss,它的值在堆内存中是hello
温馨提示:答案为网友推荐,仅供参考
相似回答