What is the main defference ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is the main defference ?

what is the main defference between "equals" and "==" operators in a string in java ?

28th Dec 2022, 5:51 PM
Muhammed Shibil M
Muhammed Shibil M - avatar
1 Answer
+ 6
== compares string instances for equality equals() compares values of string instances for equality
28th Dec 2022, 5:54 PM
Lisa
Lisa - avatar