Advertisement
Guest User

Untitled

a guest
Mar 28th, 2020
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.23 KB | None | 0 0
  1. class abstract Animal {
  2.     protected String name;
  3.     public Animal(String name) {
  4.         this.name = name;
  5.     }
  6. }
  7.  
  8. class Elephant extends Animal {
  9.     public Elephant(String name, int count) {
  10.         super(name);
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement