Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Pass the interface with the desired method. Most often it is an interface with one method.
For example, Thread uses Runnable. It has one run() method. If you need a method with arguments, then create a similar interface.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question