In Java, SAM (Single Abstract Method) interfaces are a key feature that enable the use of lambda expressions and functional programming concepts. A SAM is an interface that contains exactly one abstract method, common examples of SAM interfaces in Java include Runnable, Callable, and Comparator.
Any custom interface with a single abstract method can be treated as a functional interface, to be able to costumize code.