Advertisement
Guest User

Abstract version

a guest
Nov 17th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. class Enemy {
  2. public abstract String getDescription();
  3. }
  4.  
  5. class Goblin extends Enemy {
  6. @Override
  7. public String getDescription() {
  8. return "A filthy goblin";
  9. }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement