Monday, February 16, 2009

What are string literal pools

Check out the below code

String s = "abc";
and
String s = new String("abc")

if you think that both are equal then you are wrong .
Check this link : http://www.javaranch.com/journal/200409/Journal200409.jsp#a1
Source - www.javaranch.com

No comments:

Post a Comment