2
Reply

What is the difference between == operator and equals method?

Shekhar Kumar

Shekhar Kumar

5y
5.7k
1
Reply

    == checks both contents or values stored & references are equal or not

    while equals method checks only contents or values are equal or not

    1. == operator is complie time operator & equals method is run time.
    2. we can use equal methods in customize based comparision in class.