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
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