Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Related Rants
I have a very basic question regarding strings in Java..I am not getting the clear explanation any where..
1. When the string is created with new operator, will it be stored only on heap or on both heap and string pool??
2. When I create a string like
s1="123";
s2=s1+"5";
What would happen at the second step??
a. will it put 1235 in the string literal pool??
b.Will it create a new string 5 in the literal pool??
please answer buddies.
undefined
strings
java
core java
string literal pool