Coming from the question will two strings with same content be stored in the same memory location?
Having the Java code
String s1="Java";
will this string be allocated in the same memory location (or multipe):
- if to launch the same program multiple times executing it in parallel (concurrently)?
Possible answer:
I am currently C# developer (though programmed in Java in the previous millennium).
I asked this question because I believed it is the same between .NET CLR and Java (JVM) and I was hoping to get the answer for .NET apps (but somehow was in doubt by frequently encountered "application" pool terms).
So, it seems to be (sorry for not exhaustively searching before asking):
with the answer that string intern pool is shared per all instances/programs of the same JVM or .NET CLR.