how to write code in java this statm if
public String pass (){
b =txt_pass.getText();
if ("ameer".equals(b))
JOptionPane.showMessageDialog(null, "the password is correct");
return b;
}
how to make this
**if (user ()) retrun a **
JOptionPane.showMessageDialog(null, "the password is correct");