Sunday, January 18, 2015

Using Lambda Expression in place of Anonymous class in Java 8

Java 8 provides a very useful feature in form of lambda expression, which can greatly reduce boiler plate created by single function anonymous class in Java. By using lambdas you can implement Comparable, Comparator, Runnable, Callable, ActionListener and several other SAM type (Single Abstract Method) in just one line. Don't believe?, see this tutorial



from dzone.com: latest front page http://www.dzone.com/links/r/using_lambda_expression_in_place_of_anonymous_cla.html

No comments:

Post a Comment