Use HashMap to Call Methods
Hi Guys, Need help with an Assignment.
I need to create a HashMap, then use it to be able to call methods.
//Maps Key words to responses
private HashMap<String, String> mapResponder;
mapResponder = new HashMap<String, String>();
* List of the responders
private void fillResponseMap()
"I WANT TO LINK THIS TO A METHOD");
"I WANT TO LINK THIS TO CALL A METHOD");
Re: Use HashMap to Call Methods
Please explain what "LINK THIS TO A METHOD" means?
What will the method do? How will it be called?
If the value put in the HashMap is an instance of a class, that object could be of a class with a method that can be called.