Advertisement
JeffGrigg

p20180905 Main Compile Error

Sep 5th, 2018
532
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.40 KB | None | 0 0
  1. package p20180905;
  2.  
  3. class Animal {
  4.     Animal(){
  5.         indentifyMyself();
  6.     }
  7.     void indentifyMyself(){
  8.         System.out.println("I'm an Animal);
  9.    }
  10. }
  11.  
  12. class Human extends Animal{
  13.    Human(){
  14.    }
  15.    @Override
  16.    void indentifyMyself(){
  17.        System.out.println("I'm Human);
  18.    }
  19. }
  20. public class Main{
  21.    public static void main(String[] args){
  22.        new Human();
  23.    }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement