title: why hashCode() comparison is true and just comparison is false for two variables with string values?
body: <pre><code>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);=&gt; false
  System.out.println(s3.hashCode()==s4.hashCode());=&gt;true
  System.out.println(s3.hashCode());=&gt;2201324
  System.out.println(s4.hashCode());=&gt;2201324
  
  }
  }
  </code></pre>
  
  <p>"==" 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. </p>