Advertisement
Guest User

chaining

a guest
Nov 17th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. class Player {
  2. int charisma;
  3. int strength;
  4.  
  5. public Player(String name, String class) {
  6. this.name= name;
  7. this.class = class;
  8. }
  9.  
  10. public Player(String name, String class, int charisma) {
  11. this(name, class);
  12. this.charisma = charisma;
  13. }
  14.  
  15. public Player(String name, String class, int charisma, int strength) {
  16. this(name, class, charisma);
  17. this.strength = strength;
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement