Skip to content

Instantly share code, notes, and snippets.

@alexshavelev
Created November 13, 2014 20:30
Show Gist options
  • Save alexshavelev/c82fd403eebcf7ad3e25 to your computer and use it in GitHub Desktop.
Save alexshavelev/c82fd403eebcf7ad3e25 to your computer and use it in GitHub Desktop.
level13.lesson04.task03;
package com.javarush.test.level13.lesson04.task03;
import java.awt.*;
/* Интерфейс Animal
1. Унаследовать Fox от интерфейса Animal.
2. Поменяй код так, чтобы в классе Fox был только один метод - getName.
3. Методы удалять нельзя!
*/
public class Solution
{
public static void main(String[] args) throws Exception
{
}
public interface Animal
{
//Color getColor();
}
public static class Fox implements Animal
{
public String getName()
{
return "Fox";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment