O'Reilly logo

Learning Java Functional Programming by Richard M Reese

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Debugging lambda expressions

Both NetBeans and Eclipse support debugging lambda expressions. While it is always possible to create multiline lambda expressions and use print statements to display the values of variables, it is better to use a debugger when possible. Not only do we have to add additional statements which would have to be removed in the production version of the application, but debuggers also provide additional information about the state of the program and frequently allow some variables to be modified while the debugger is executing.

We will demonstrate how to debug a lambda expression that takes a string and returns the string concatenated with its lowercase equivalent. This operation is shown here:

 List<String> list = Arrays.asList("Huey", ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required