Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. class Human {
  2. private int thoughts = 1;
  3.  
  4. protected int getThoughts() {
  5. return this.thoughts;
  6. }
  7. }
  8.  
  9. class Man extends Human {
  10. private int decide() {
  11. return this.getThoughts();
  12. }
  13. }
  14.  
  15. class Woman extends Human {
  16. public int decide() {
  17. return this.getThoughts();
  18. }
  19. }
  20.  
  21. Man man = new Man();
  22. Woman woman = new Woman();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement