In Java, the == operator is used to compare the references of two objects to see if they point to the same object in memory.
When comparing strings using the '==' operator, the comparison is based on the actual characters in the string.