Question: Give three ways of making a lambda expression that applies the length method to a String (or four if you read Special Topic 19.2). Data
Give three ways of making a lambda expression that applies the length method to a String (or four if you read Special Topic 19.2).
Data from Special Topic 19.2


Special Topic 19.2 Method and Constructor References When a lambda expression consists of just one method call, you can use a very concise syntax, called a method reference. A class name followed by a :: symbol and method name is equiva- lent to a lambda expression with parameters "at the right places".
Step by Step Solution
3.33 Rating (159 Votes )
There are 3 Steps involved in it
To create a lambda expression that applies the length method to a String you can use different syntaxes Three straightforward ways are listed below an... View full answer
Get step-by-step solutions from verified subject matter experts
