by evanspa · 9y ago · 0 comments
The GoF book predates the public release of Java. The code samples in GoF are in C++ and Smalltalk.
Correct me if I'm wrong, but Java 8 does allow functions to be passed around. E.g., if a function takes as input a Runnable, I can pass a no arg lambda expression as input.
https://www.tutorialspoint.com/java8/java8_functional_interf...
Beyond that, by at least 1.4 you could pass methods using the reflections API, though that was kludgy in a lot of ways.