Why have we used .equals() instead of ==?
Why have we used .equals()
Hey @Rishabh8488
== operators for reference comparison ( address comparison ) and . 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.