Expeditors interview question

What is the difference between comparing a string variable with "==" and .equals()?

Interview Answer

Anonymous

Aug 31, 2015

== checks for the exact string reference .equals() checks for the equivalency of the 2 strings.