heap memory vs string pool

Solutions on MaxInterview for heap memory vs string pool by the best coders in the world

showing results for - "heap memory vs string pool"
Lou
25 May 2016
1String uses a special memory location
2to reuse of String objects called String Constant Pool.
3String objects created without
4the use of new keyword are stored in the
5String Constant Pool part of the heap.
6It doesn't create the same string object
7if there is already string constant in the pool.
8
9
10String str = new String("");
11String str2 = "";
12
13Str goes to heap memory
14str2 goes to string pool location
15
16They both immutable and they save in different 
17memory location. 
queries leading to this page
string pool in heap memorystring pool memory in javahow does string pool work in javawhat is java string pool 3fstring intern pool javajava string poolstring pool explainedstring pool concept in javastring pool in java mediumwhat is string constant pool 3fin string concert which method where is stored heap area ya scp areain java where is string pool storedstring constant poolstring heap and string poolstring pool in java 8string pool in java 8 vs java 11what is java string poolwhat is string poolwhat is a string pool in javastring poolwhere is the string pool javastring pool constantdoes string build string belong to string pool javaheap memory vs stack memory vs string pool memory4 what is string constant pool 3fjdk string pooljava string not in string poolwhat is string pool javastring pool javarush what is java string pool 3fstring pool trong javastring pool vs string heapwhat is string literal pool in java 3fstring pool java 8why string poolpool string javastring built with operations is not in string poolwhere is string pool stored in javastring pool in javawhat is the string constant pooljava where is string pool storedconcept of string pool in javastring constant pool and hepastring pool jaba 5djava string pool exampledoes string pool make java more efficientheap memory and string pool in javastring pool area in javastring poolingsttring pool with class level variablestring constant pool write the significance of java string pool 3fjava string constant poolstring pool memory javahow to print string pool in javastring vs st pooljava string pool java 9use of string constant pool in javadifference between string pool and heap memoryjava string pool java 8how to see string pool javawhat is string pool in javaimprovement in string pool java 8java string pool java 10how string pool works in javastring pool javahow to check string pool in javaheap memory vs string pool