I have created a simple interface using java8. In that it contains one method and one default method.
interface Lambda{
default void dummy(){
System.out
If I understand it correctly. You are trying to call a default method in an interface through lambda implementation. I think it can be done.
@FunctionalInterface
interface Value
{
String init(Value a);
default String add(String b)
{
return "added content "+b;
}
default String getResult()
{
String c = init(this);
return c;
}
}
public class Main
{
public static void main(String[] args)
{
Value v = a -> a.add("inpout"); // here I am calling add method in Value interface.
String c = v.getResult();
System.out.println(c);
}
}