This document shows how to use anonymous classes and method references in Java. It defines an interface with a getCipher method that takes an ArrayList, and two classes - one that uses an anonymous class to implement the interface on an object, calling its getCipher method; and another that uses a method reference to do the same.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
41 views
Anonymous Interface
This document shows how to use anonymous classes and method references in Java. It defines an interface with a getCipher method that takes an ArrayList, and two classes - one that uses an anonymous class to implement the interface on an object, calling its getCipher method; and another that uses a method reference to do the same.