0
Passing methods as arguments
I know that in some languages, you can pass functions or methods as arguments of another, so that it could be called later by the latter method. (Example: Passing method A into method B, so that method A will be called inside method B) (Example: Passing method C into method B, so that method C, not method A, will be called inside method B) Is this possible in Java? If so, how?
2 Réponses
+ 2
I don't speak Java, but I found this, which seems to show several ways to do it:
https://stackoverflow.com/questions/2186931/java-pass-method-as-parameter
0
https://code.sololearn.com/cybCh5BLNgeF/#