How many String object will created in the below java code?

后端 未结 0 1751
南笙
南笙 2020-12-02 12:33

One interviewer asked me that how many string object will create via using below code?

String s = new String("Test1");
s += "Test2";
Syste         


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