Day 49 - Took a while to understand method references type 3 - Reference to an arbitrary object of a particular type #methodreference#java#100DaysofCode
#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
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:
#Lambda expressions:
((str) -> str.toUpperCase()); can be written as
(str -> str.toUpperCase()); //without paranthesis
And more precisely as
(String::toUpperCase); // :: is #MethodReference. #java8#JavaEE8