@@ -0,0 +1,958 @@
+package com.javarush.task.task14.task1405;%0A%0A/* %0AFood%0A*/%0A%0Apublic class Solution %7B%0A    public static void main(String%5B%5D args) %7B%0A        Food food = new Food();%0A        Selectable selectable = new Food();%0A        Food newFood = (Food) selectable;%0A%0A        foodMethods(food);%0A        selectableMethods(selectable);%0A    %7D%0A%0A    public static void foodMethods(Food food) %7B%0A        //%D1%82%D1%83%D1%82 %D0%B4%D0%BE%D0%B1%D0%B0%D0%B2%D1%8C%D1%82%D0%B5 %D0%B2%D1%8B%D0%B7%D0%BE%D0%B2 %D0%BC%D0%B5%D1%82%D0%BE%D0%B4%D0%BE%D0%B2 %D0%B4%D0%BB%D1%8F %D0%BF%D0%B5%D1%80%D0%B5%D0%BC%D0%B5%D0%BD%D0%BD%D0%BE%D0%B9 food%0A        food.onSelect();%0A        food.eat();%0A    %7D%0A%0A    public static void selectableMethods(Selectable selectable) %7B%0A        //%D1%82%D1%83%D1%82 %D0%B4%D0%BE%D0%B1%D0%B0%D0%B2%D1%8C%D1%82%D0%B5 %D0%B2%D1%8B%D0%B7%D0%BE%D0%B2 %D0%BC%D0%B5%D1%82%D0%BE%D0%B4%D0%BE%D0%B2 %D0%B4%D0%BB%D1%8F %D0%BF%D0%B5%D1%80%D0%B5%D0%BC%D0%B5%D0%BD%D0%BD%D0%BE%D0%B9 selectable%0A        selectable.onSelect();%0A    %7D%0A%0A    interface Selectable %7B%0A        void onSelect();%0A    %7D%0A%0A    static class Food implements Selectable %7B%0A        @Override%0A        public void onSelect() %7B%0A            System.out.println(%22food was selected%22);%0A        %7D%0A%0A        public void eat() %7B%0A            System.out.println(%22food was eaten%22);%0A        %7D%0A    %7D%0A%7D%0A

Complete task1405