I don't know what's going on with it. Code below. I'm not trying to get anyone to code the whole thing for me, just don't know what's wrong and would like a little help
private void javabutton1(java.awt.event.ActionEvent evt) {
String testa= new String (jPasswordField2.getPassword());
String testb= new String (jPasswordField3.getPassword());
if (testa.toString() == testb.toString()){
JOptionPane.showMessageDialog(this, "Success");
}
}
When I replace testa.toString() == testb.toString()) with "A" == "A". The messagebox "Success" is achieved but this entry comparison won't work
Also: The text entered in both jPasswordField2 and jPasswordField3 are the same.