How many string objects will be created by the following code?
String s = \"Mahendra\" + \"Singh\" + \"Dhoni\";
Will it create 4 string obj
This will create only 1 string s in string pool. Please read the difference bwt String object and literal it will help you understand.