As mentioned earlier, there's no escaping strings in Java programs. In fact, you should embrace them. There is, however, an issue of having too many String instances around in an application, just like there's an issue of having too much of any objects around in memory. If you have ever used a performance tool on a Java application, you have definitely noticed the large number of objects and especially String in the application. Of course, this is entirely dependent on the application and the circumstance. Having too many instances alive in memory and relying on the garbage collection process to clean them up is not the best approach. Just be aware that because a String is an object just like any other, it takes up memory and therefore will cause performance issues if there are too many instances being used without the proper cleanup. |