Java SE 8: Implementing Event Listeners with Lambdas
Recall that interfaces like ActionListener
that have only one abstract
method are functional interfaces in Java SE 8. In Section 17.9, we show a more concise way to implement such event-listener interfaces with Java SE 8 lambdas.
Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.