Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. public interface Flys {
  2.    
  3.    String fly();
  4.    
  5. }
  6.  
  7. // Class used if the Animal can fly
  8.  
  9. class ItFlys implements Flys{
  10.  
  11.     public String fly() {
  12.        
  13.         return "Flying High";
  14.        
  15.     }
  16.    
  17. }
  18.  
  19. //Class used if the Animal can't fly
  20.  
  21. class CantFly implements Flys{
  22.  
  23.     public String fly() {
  24.        
  25.         return "I can't fly";
  26.        
  27.     }
  28.    
  29. }