How can I express that two values are not equal to eachother?
"Not equals" can be expressed with the "not" operator !
and the standard .equals
.
if (a.equals(b)) // a equals b
if (!a.equals(b)) // a not equal to b
if (!secondaryPassword.equals(initialPassword))
Just put a '!' in front of the boolean expression