"==" always compare the memory location or object references of the values.
equals method always compare the values.but equals also indirectly uses the "==" operator to compare the values. Integer uses Integer cache to store the values from -128 to +127.If == operator is used to check for any values between -128 to 127 then it returns true. for other than these values it returns false .
In string, if string is initialized like this
String s1="abc"
String s2="abc"
String s1 and s2 are pointing the same location in memory or String pool.
if string is initialized like this
String s1=new String("abc");
String s2=new String("abc");
String s1 is pointing the new location in which it contains String "abc"
String s2 is pointing the new location in which it contains String "abc" but s1's location is different from s2's location.In that situation equals method is useful for string comparison.
Refer the link for some additional info