Guest User

Untitled

a guest
Jan 29th, 2015
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. import java.util.HashMap;
  2. import java.util.Map;
  3.  
  4. abstract class Animal {
  5. Map<String, Object> m1 = new HashMap<String,Object>();
  6. {
  7. m1.put("Cow", new Cow());
  8. }
  9.  
  10. abstract int age();
  11. }
  12.  
  13. class Cow extends Animal {
  14. @Override
  15. int age() {
  16. // TODO Auto-generated method stub
  17. return 0;
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment