Created
March 19, 2017 12:14
-
-
Save fermopili/f83d402568e4ca4540f64c0954b6681f to your computer and use it in GitHub Desktop.
com.javarush.task.task12.task1231;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Нужно исправить программу, чтобы компилировалась и работала | |
*/ | |
public class Solution { | |
public static void main(String[] args) { | |
Horse horse = new Pegas(); | |
horse.run(); | |
} | |
public static interface Fly { | |
public abstract void fly(); | |
} | |
public static class Horse { | |
public void run() { | |
} | |
} | |
public static class Pegas extends Horse implements Fly { | |
public void fly() { | |
} | |
} | |
public static abstract class SwimPegas extends Pegas { | |
public abstract void swim(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment