Why do we reference a method?

Why do we reference a method?
Answer
Method reference is used to refer method of functional interface. It is compact and easy form of lambda expression. Each time when you are using lambda expression to just referring a method, you can replace your lambda expression with method reference.
 

Tìm kiếm

Back
Top