Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- abstract class Animal {
- abstract int age();
- }
- class Dog extends Animal {
- @Override int age() { return ... }
- }
- class Cat extends Animal {
- @Override int age() { return ... }
- }
- class Animal {
- int age() { throw new Error("override me"); }
- }
Add Comment
Please, Sign In to add comment