Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Human {
- private int thoughts = 1;
- protected int getThoughts() {
- return this.thoughts;
- }
- }
- class Man extends Human {
- private int decide() {
- return this.getThoughts();
- }
- }
- class Woman extends Human {
- public int decide() {
- return this.getThoughts();
- }
- }
- Man man = new Man();
- Woman woman = new Woman();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement