Ugo Cei dijo: > Il giorno 17/apr/04, alle 15:31, Antonio Gallardo ha scritto: > >> I think it is a good programming practice plus: >> >> It saves resources. > > No, it does not. > > ``String literals-or, more generally, strings that are the values of > constant expressions (�15.28)-are "interned" so as to share unique > instances, using the method String.intern.'' > > (http://java.sun.com/docs/books/jls/second_edition/html/ > lexical.doc.html#101083) > > This means, unless I'm seriously mistaken, that you can always use "" > instead of StringUtils.EMPTY without using a single bit of memory more. > And there's no GC involved.
Thanks for pointing out the error. You are right. I will rewrote it as it maybe. The change was really meaningless and the original code too. Best Regards, Antonio Gallardo.
