I have two question when learning lambda expression in java.
When we use
::
in java. I see in the book usingEmployee::getSalary
but lack of explanation. Do we use::
when we want to implement some function of the class (likegetSalary()
method in classEmployee
)?Function<Employee,double> salary = Employee::getSalary
Do Function here like we create methodpublic static double salary(Employee e)
?
Thanks.