You have written a class called Tree. In a second program you have the line:.Tree.getTemperature();Which of the following must be true about the method getTemperature() for the method call to work?1. getTemperature() must be void.2. getTemperature() must be declared static.3. getTemperature() must return a value.4. getTemperature() must be declared private .5. Nothing, this method call is not legal and will cause an error.

Solved
Show answers

Ask an AI advisor a question