equals checks content while == checks references. For string general comparison, it is safe to use equals.