Computer Science, asked by arindampalkgp, 1 year ago

difference between equals() and ==


QGP: In JAVA, equals() is used to compare two strings, while == compares two numbers.
QGP: So, for different data types, the method of comparing is different
arindampalkgp: give at least 2 differences

Answers

Answered by aleemzaheer
4
Equals () is mostly used in x comparing string variable whereas == is used to compare any datatype.
Similar questions