How do you replace lambda expression with method reference?

Nam Phong

New member
How do you replace lambda expression with method reference?
Answer
To summarize: If the purpose of the lambda expression is solely to pass a parameter to an instance method, then you may replace it with a method reference on the instance. If the pass-through is to a static method, then you may replace it with a method reference on the class.
 

Tìm kiếm

Back
Top