X

Getting Started with Lambda Expressions

Lambda expressions are new to Java 8, and their syntax might be baffling if you are not used to them. In his article "Getting Started with Lambda Expressions", Mohan Basavarajappa shows how they can help you write more-concise code that is easier to maintain and might even change the way you structure your programs.

Rather than writing anonymous classes to define small, specific system behavior, he shows how lambda expressions provide a lean approach for writing event handlers that describe what action to perform on specific events.

To understand lambda expressions, you need to understand functional interfaces--which are Java interfaces with only one method declaration. Using examples, Basavarajappa walks through the syntax of functional interfaces and lambda expressions and shows how to invoke functional interfaces. Then he shows how different lambda expressions can be sent to the same method to perform different processing objectives.

To learn more, read the article.

Join the discussion

Comments ( 1 )
  • Arvind Monday, August 1, 2016
    Hi, I am intersted in learning lambdas , Please add me to the group.
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services