new String overriding the previous String
Ok, I want to ask whether this code fragment memory efficient or not:
String str =new String("The first value");
...//some code here
str =new String("The second value");
I mean what happens to the memory? Is it properly released from the first object?
And if I do this hundred of times wil it be ok?

