Annotations, Functional Interfaces, and Lambdas in Java
java
dev.to
These three concepts build on each other more than they seem to at first glance: annotations give the compiler metadata to act on, one specific annotation (@FunctionalInterface) marks a particular kind of interface, and that kind of interface is exactly what makes lambda expressions possible. This post walks through all three, in that order. Annotations Metadata(s) for the compiler. An annotation in Java is metadata attached to code — a class, method, field, or interface — that does