Advertisement
Guest User

Untitled

a guest
Nov 5th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. package profile;
  2.  
  3. public class User {
  4. private String username;
  5. private String password;
  6.  
  7. public User(String username, String password) {
  8. this.username = username;
  9. this.password = password;
  10. }
  11.  
  12. public String getUsername() {
  13.  
  14. return username;
  15. }
  16.  
  17. public void setUsername(String username) {
  18. this.username = username;
  19. }
  20.  
  21. public String getPassword() {
  22. return password;
  23. }
  24.  
  25. public void setPassword(String password) {
  26. this.password = password;
  27. }
  28.  
  29. @Override
  30. public String toString() {
  31. return this.getUsername()+" "+this.getPassword()+"\n";
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement