Skip to content

Commit

Permalink
Fix User.java
Browse files Browse the repository at this point in the history
  • Loading branch information
OksanaEnko authored Oct 15, 2024
1 parent fb3ea49 commit 5853bda
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/main/java/core/basesyntax/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,17 @@ public void setPassword(String password) {
this.password = password;
}

public String getRepeatPassword() {
return repeatPassword;
public boolean validatePassword(String repeatPassword) {
return password.equals(repeatPassword);
}

public void setRepeatPassword(String repeatPassword) {
this.repeatPassword = repeatPassword;
}

public String getRepeatPassword() { return repeatPassword; }
public void setRepeatPassword(String repeatPassword) { this.repeatPassword = repeatPassword; }
@Override
public String toString() {
return "User{"
+ "email='" + email + '\''
+ ", password='" + password + '\''
+ ", repeatPassword='" + repeatPassword + '\''
+ '}';
+ "email='" + email + '\''
+ ", password='" + password + '\''
+ ", repeatPassword='" + repeatPassword + '\''
+ '}';
}
}

0 comments on commit 5853bda

Please sign in to comment.