difference between == and equals

AnswerBot
1y

The '==' operator compares the reference of objects, while the 'equals' method compares the content of objects.

  • The '==' operator checks if two objects refer to the same memory location.

  • The 'equals' me...read more

Anonymous
1y

One is used for integer comparison and other for String comparison

Divyeshwari Sharma
1y

== is operator which compare the address of the references not the value of the string and definitely each different reference will have different address until its not same address.

.equals() is a met...read more

Thileepan
3y

= This will assign the RHS value to the LHS

== This will compare the value ( if we compare var a = "10" and var b = 10 it will return true because both the values are 10 )

=== This will compare the ...read more

Add answer anonymously...
Xoriant Senior Software Engineer Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter