I was going through SCJP
examination and found one line in one book.
String s = new String("abc");
And it was written that, two objects will be created on above line. one on HEAP
and one on STRING POOL
.
I am not satisfied by the declaration given there. Can someone make me understand why two objects are created ?
Thanks in advance.