Java Password Checker says passwords dont match when the do. Second time in the loop

I am trying to create a password checker in java that has the following rules.

  1. the first password has to match the second one
  2. password is 8-20 characters long
  3. must have a capitol 'Z' somewhere in it
  4. Must end in a '7' number I tried creating different things for this and couldn't figure out when enter the following

Please enter a password or a single 'Q' to quit (7)

asdf

Please re-enter the same password (8)

asdf

Password must be between 8-20 characters in length (1)

Please enter a password or a single 'Q' to quit (4)

asdfasdf

Please re-enter the same password (5)

asdfasdf

Passwords do not match (6) <------ I don't understand why it says that they don't match

Please enter a password or a single 'Q' to quit (4)

   static void checker(String password, String passwordMatch) {
    while ((password.length() < 8) || (password.length() > 20)) {
        System.out.println("Password must be between 8-20 characters in length (1)");
        enteringPassword(password, passwordMatch);
    }
    while (!password.contains("Z")) {
        System.out.println("Password must contain capitol 'Z' (2)");
        enteringPassword(password, passwordMatch);
    }
    char last = password.charAt(password.length() - 1);
    if (last != 7) {
        System.out.println("Password last character must be a '7' (3)");
    }
    }

    static void enteringPassword(String password, String passwordMatch) {
    Scanner userInput = new Scanner(System.in);
    System.out.println("Please enter a password or a single 'Q' to quit (4) ");
    password = userInput.nextLine();
    if (password.length() == 1 && password.charAt(0) == 'Q') {
        System.exit(0);
    }
    System.out.println("Please re-enter the same password (5) ");
    passwordMatch = userInput.nextLine();
    if (password != passwordMatch) {
        System.out.println("Passwords do not match (6)");
        enteringPassword(password,passwordMatch);
    }
    while (password == passwordMatch) {
        break;
    }
    }

    public static void main(String[] args) {
    String password;
    Scanner userInput = new Scanner(System.in);
    System.out.println("Please enter a password or a single 'Q' to quit (7)");
    password = userInput.nextLine();
    if (password.length() == 1 && password.charAt(0) == 'Q') {
        System.exit(0);
    }
    String passwordMatch;
    System.out.println("Please re-enter the same password (8)");
    passwordMatch = userInput.nextLine();

    if (!password.equals(passwordMatch)) {
        System.out.println("Passwords do not match (9)");
        enteringPassword(password, passwordMatch);
    }
    checker(password, passwordMatch);

    System.out.println("You entered a valid password! (10)");

    }

    }