Is there a method similar to equals() that expresses "not equal"?
An example of what I'm trying to accomplish is given below:
if (secondaryPassword.equals(initialPassword)) { JOptionPane.showMessageDialog(null, "You've successfully completed the program."); } else { secondaryPassword = JOptionPane.showInputDialog(null, "Your passwords do not match. Please enter you password again."); }
I am trying to find something that will not require me to use if ( a != c) .
source share