public class a {
public static void main(String args[]){
final String s1="job";
final String s2="seeker";
String s3=s1.concat(s2);
String s4="jobseeker";
System.out.println(s3==s4);=> false
System.out.println(s3.hashCode()==s4.hashCode());=>true
System.out.println(s3.hashCode());=>2201324
System.out.println(s4.hashCode());=>2201324
}
}
"==" compare hashCode of the Object... .hashCode of the s3 and s4 are the same but s3==s4 gives false . Anyone explain. I need an answer not useless question not in correct format comments. people who do not know answer keep away from this question.