UltraVasko

Task.User

Feb 21st, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.61 KB | None | 0 0
  1. public class User{
  2.  
  3.     public String username;
  4.     public String password;
  5.     public int userId;
  6.     public int followers=0;
  7.     public int following=0;
  8.    
  9.     public User(String username,String password,int userId) {
  10.         this.username=username;
  11.         this.password=password;
  12.         this.userId=userId;
  13.     }
  14.    
  15.     void printData() {
  16.         System.out.println("Username: "+this.username);
  17.         System.out.println("Pasword: "+this.password);
  18.         System.out.println("ID"+this.userId);
  19.         System.out.println("Fowollers: "+this.followers);
  20.         System.out.println("Fowolling: "+this.following);
  21.     }
  22.    
  23.     void AddFollowing(int num) {
  24.         following+=num;
  25.     }
  26.  
  27. }
Add Comment
Please, Sign In to add comment