みなさん、ご協力ありがとうございました!私はそれを理解し、それを実行しました。私は物事を実際よりも難しくするのが好きだと思います。
import javax.swing.JOptionPane;
public class PasswordManager{
private static String masterPassword = "secret3";
public static void main(String[] args){
        boolean mypass = false;
        String password = JOptionPane.showInputDialog(null, "Enter Password:");
        mypass = checkPassword(password);
        if (mypass == true)
            System.out.println("Your Password is Correct");
        else
            System.out.println("Your Password is incorrect");
}
private static boolean checkPassword(String password){
        if(password.equalsIgnoreCase(masterPassword))
            return true;
        else
            return false;
}
}