In Java 8 the lambda expression is introduced to help with the reduction of boilerplate code. If the interface has only one method it works fine. I
Lambda expressions can only be used to implement functional interfaces, which are interfaces having a single abstract method. An interface with two abstract methods can't be implemented by a lambda expression.