Created
September 14, 2014 12:14
-
-
Save AmirHooshangi/9176bd6a46906accbf3e to your computer and use it in GitHub Desktop.
This file contains hidden or 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 interface Man{ | |
void sayHi(); | |
} | |
public class Male implements Man{ | |
sayHi(){ | |
System.out.println("im male"); | |
} | |
} | |
public class Female implements Man{ | |
sayHi(){ | |
System.out.println("im female"); | |
} | |
} | |
Man male = new Male(); | |
Man female = new Female(); | |
:)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment