Hi
operator is the equality operator
equals() is for content comparison
operator checks if both object references refer to the same memory location eg: if (a b) it means it verifies whether both a and b refer to the same location in memory.
equals() if for content comparison.
eg:String a chandra ; String b chandra ; String c radha ;
if ( a.equals(b)) returns true bcoz both contains the same content.
if (a.equals(c)) returns false bcoz a and c contents are different.
I hope this would have solved your doubt.
Thanks
Chandra