Created
March 19, 2017 12:55
-
-
Save fermopili/cfb78433e46385da67080660ce6208de to your computer and use it in GitHub Desktop.
com.javarush.task.task15.task1509
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Мужчина или женщина? | |
*/ | |
public class Solution { | |
public static void main(String[] args) { | |
Man man = new Man(); | |
Woman woman = new Woman(); | |
printName(man); | |
printName(woman); | |
} | |
public static void printName(Human man) { | |
} | |
public static class Human { | |
} | |
public static class Man extends Human { | |
} | |
public static class Woman extends Human { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment