How many String objects'll be created and what would be the string values of those objects
String str1 = new String("test");
String str2 = new String("test");
String str3 = "test";
As per my understanding , Total three objects will be created. Is there any programmatically way to verify how many objects will be created Also on which memory area (STACK,HEAP,STRING POOL)