0
How to use more than one parameters in method in java class?
i try put name and food two variable in parameter in eat() method but i dont how to give them input because there are two variable in parameter in method eat(). Please HELP
1 ответ
+ 1
void eat(Food food, EatingMode mode) {...}
To call it just use
rabbit.eat(carrot,EatingMode.FAST)