why hashcode are same of string object ???
I'm trying to understand how string pool works.I have gone through many sites and finally i'm more confused now. Let me put down my doubts here. Someone help me in understanding them.
class cov {
public static void main(String[] args) {
String s = "abc"; //Object on string pool
System.out.println(s.hashCode());
String str = new String("abc"); //This statement does two things
System.out.println(str.hashCode());
}
}