Add System.out.println() statements to your eat(String) method in order to generate a visible trace of the method call and return mechanism. Use println to display eat()'s parameter, and the food instance variable both before and after the assignment statement. Try to generate the following output:
starting the eat method
str parameter = bananas
food instance variable = no food
str parameter = bananas
food instance variable = bananas
exiting the eat method
Using println statements to display the values of variables and to trace program control is a good debugging technique. You will want to use this technique to locate bugs when things go wrong.