#Java Tips:
If you happen to pass a lambda expression to a method that does Integer addition only,e.g
(currentValue, incremental) -> currentValue + incremental);
You can replace the whole line with-
Integer::sum
#LambdaExpression#MethodReference
#Lambda expressions:
((str) -> str.toUpperCase()); can be written as
(str -> str.toUpperCase()); //without paranthesis
And more precisely as
(String::toUpperCase); // :: is #MethodReference. #java8#JavaEE8
Day 49 - Took a while to understand method references type 3 - Reference to an arbitrary object of a particular type #methodreference#java#100DaysofCode
Do you know the difference between #MethodReference and #Lambda at the moment we declare them?
#JavaChallengers
If you think you know the difference, try out this challenger and see if you can get it right:
It's great to have a @Java certification and the challengers will help you to achieve this goal!
#JavaChallengers#MethodReference
Improve your @Java skills by doing this challenger: