i know that when there is already an existing string in pool then a new string literal wont be made again.
i know the difference between string constant pool and heap also
i just want to know when is string pool created for a class for the below example.
String s="qwerty"; String s1="qwer"+"ty";// this will be resolved at compile time and no new string literal will be made String s2=s.subString(1); will create qwerty at run time s==s1; //true s==s2;//false i want to know for String s1 is resolved at compile time does that mean string pool is created at compile time ??