Question: what is the difference between == and .equals()?
Answer: equals() method for content comparison. In simple words, == checks if both objects point to the same memory location whereas . equals() evaluates to the comparison of values in the objects. ... When we use == operator for s1 and s2 comparison then the result is false as both have different addresses in memory.