+ 1

How to pass a function as a parameter to another function in Java?

Writing a function whose function is to test other functions passed to it and find the better one. Without using switch case, how can I pass the functions as parameters?

10th Mar 2017, 11:08 AM
ShadowOfTwo
ShadowOfTwo - avatar
1 Antwort
+ 4
public int nameOfMethod(ClassName anyVariableName){ stuff} anyVariableName is the object of className
10th Mar 2017, 11:48 AM
Meharban Singh
Meharban Singh - avatar