Jayesh A Lalwani
posted 4 years ago
The Java equivalent of a "function" is an object which implements the Runnable interface, if you don't want the function to return anything. If you want the function to return something of type V, let's say, then you need an object which implements the Callable<V> interface. You can put such objects, like any other objects, into an array or a List or a Map, whichever works better for you.