A while back ( October last year ) I answered this question:
Explaining how to use Java's string.intern() and the VisualVM profiler, added screenshots posted some sample code and in general putting a good effort on it.
I think it's a good answer ( and have +20 votes so at least 20 people thought the same ) even though the question was not very clear and was first closed and then deleted.
Today, I got a similar question, about how to reduce memory footprint and I this answer came to my mind, but since it is marked as deleted, I can't reference it ( and also so, it took me a while to find it my self).
I have voted already to undelete it, can I have two more +10k rep users to vote to undelete it, so I use as a reference Hey look here and see if it works for you