What happens to Strings when object is cloned in Java?

后端 未结 0 1631
死守一世寂寞
死守一世寂寞 2021-02-20 09:58

By default Java does Shallow Cloning, if an object is cloned and it has a String like this String s = new String("Hi"); then the cloned object will point

相关标签:
回答
  • 消灭零回复
提交回复
热议问题