Skip to content

Instantly share code, notes, and snippets.

@fermopili
Created March 19, 2017 12:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fermopili/f83d402568e4ca4540f64c0954b6681f to your computer and use it in GitHub Desktop.
Save fermopili/f83d402568e4ca4540f64c0954b6681f to your computer and use it in GitHub Desktop.
com.javarush.task.task12.task1231;
/*
Нужно исправить программу, чтобы компилировалась и работала
*/
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