Question No 1:
– Why string constant pool supports only string data type to store in Java?
– Why not other data type or wrapper class?
Question 2 :
How many objects will be created for the below code? and why?
String str1 ="abc"; String str2 = new String("abc");