as Ernest says: it is just referring to the Object instance...
Peter Kleczka
Greenhorn
Joined: Feb 09, 2003
Posts: 18
posted
0
Thanks Ernest
This makes sense now. Since the static references are going to hang around "forever" there is nothing to be garbage collected. But I assume the original assignment (String colorString = "") would leave the empty string in garbage collection territory since there is nothing to reference it.
Thanks again, Peter
Steven Bell
Ranch Hand
Joined: Dec 29, 2004
Posts: 1071
posted
0
Actually no, since it is a 'String Literal' it will be interned and also hang around forever. There will be only one instance of String that contains "" unless one is created as new String("");