Science, asked by MDwahidsidd1865, 1 year ago

What's the difference between "a == b" and "a.equals(b)" in Java?

Answers

Answered by NLenhart
1

Difference between a.Equals(b) and a == b. The Equals() and == operator are used for comparison and both returns the boolean value (true/false). For Value Type == and Equals() works in the same way, both compare two object by value.

Similar questions