Delete comment from: Java67
Hi.
What is the use of creating two object i.e using new keyword .
For Ex. String S=new String("abc");
In this example there will be 2 objects. 1 in string Pool and 1 in NonPool Memory.
But what is the relevance of String pool object when using new Keyword. Is it available for next time when we create another object using new keyword with same value and if not then why it is there?
Jan 5, 2016, 11:43:51 AM
Posted to Difference between String literal and New String object in Java