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 ?