dimanche 1 mars 2015

About String object creation

I am bit confused about string object creation. Can someone tell me, how many String objects get created in below 2 cases?


1)



String s = new String("abc");
s = s + "xyz";


2)



String s = new String("abc");
String s1 = "xyz";

Aucun commentaire:

Enregistrer un commentaire