Implementing an interface with two abstract methods by a lambda expression

Viewed 13650

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. If it consists of multiple methods, then none of the methods work. How can I handle multiple methods?

We may go for the following example

public interface I1()
{
    void show1();
    void show2();
}

Then what will be the structure of the main function to define the methods in the main itself?

4 Answers
Related