This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
When this method completes, will the entry in the String Pool for "abc" remain or does it get deleted from the String Pool? If it remains, then when will it go away? Perhaps when the program ends? When the JVM stops running?
Yes , "abc" will remain in String Pool even after this method gets completed and I beleive it only be removed when program gets terminated , Since String pool is gets created in Perm area of Java heap , it potentially exposes the chance of OutOfMemory in Perm space with huge string literal , anybody disagree ?