![radha](https://www.crazyengineers.com/img/avatar.jpg)
radha
Member • Oct 23, 2014
Query in below java code
String a= "/u0041";
String h=new String("A");
System.out.println(a==h);
System.out.println(a.hashCode()==h.hashCode());
Please explain why the second print statement is giving false when in the string pool we have the same string literal "A".
String h=new String("A");
System.out.println(a==h);
System.out.println(a.hashCode()==h.hashCode());
Please explain why the second print statement is giving false when in the string pool we have the same string literal "A".