What is Java String Pool? Pankaj November 28, 2012 Java As the name suggests, String Pool is a pool of Strings stored in Java heap memory. We know that String is special class in java and we can create String object using new operator as well as providing values in double quotes. Here is a diagram which clearly explains how String Pool is maintained in java heap space and what happens when we use different ways to create Strings. String pool helps in saving a lot of space for Java Runtime although it takes more time to create the String. When we use double quotes to create a String,
Read full article from What is Java String Pool?
No comments:
Post a Comment