Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package p20180905;
- class Animal {
- Animal(){
- indentifyMyself();
- }
- void indentifyMyself(){
- System.out.println("I'm an Animal);
- }
- }
- class Human extends Animal{
- Human(){
- }
- @Override
- void indentifyMyself(){
- System.out.println("I'm Human);
- }
- }
- public class Main{
- public static void main(String[] args){
- new Human();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement