Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class abstract Animal {
- protected String name;
- public Animal(String name) {
- this.name = name;
- }
- }
- class Elephant extends Animal {
- public Elephant(String name, int count) {
- super(name);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement