D
D
Daniil Demidko2017-01-05 09:15:10
Java
Daniil Demidko, 2017-01-05 09:15:10

How to pass a method in Java?

Standard wrappers from java.util.function.* do not interest me.
The question is how to pass a method through interfaces.
535e6b3b3c6746e7b72ec7376e01778e.PNG
How to pass a method like this?
I know for sure that it is possible, I saw the code somewhere.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2017-01-05
@Daniro_San

What is fn? In the code you provided, this name is not defined anywhere. Also, Test takes two parameters, and you pass one. I suspect that you wanted
Test(Main::Func, 475)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question