Actually I am bit confused that how many object created in below "code processing".
String s=new String("A");
s=s+"B";
Actually someone said that here 4 objects will be created but in whole processing but how not understand.
Please anyone can give me detail description also included memory part such string pool etc.