While solving real-life use cases through programming and also while testing your code you will come across scenarios where you have to compare the value of different objects. And, then to solve the problem you can use the equality operator.