When programming in C / C ++ or Python, I sometimes used a dictionary with links to functions according to the specified keys. However, I really don't know how to have the same or at least similar behavior in Java, allowing me a dynamic key-function (or method, in Java slang).
Also, I found a HashMap technique that someone suggested, but is this the best and most elegant way? I mean, for every method I want to use, there seems to be a lot to create a new class.
I would really appreciate every contribution to this.
source share