Overload the Tree class's info(Object s) method twice to get 3 methods: info(Object s), info(Number s), and info(String s). Then study the info(Object s) method and create similar functionality in the new methods. For example, the result for the info(Number s) method might be: "Tree No. 123, Number method, parameter Short.
OOP: Method overloading
You must be signed in to leave a comment
This page doesn't have any comments yet