public interface FooBar { int foo(); int bar(); } public Afob implements FooBar {...}
public interface Foo { int foo() } public interface Bar { int bar() } public interface FooBar extends Foo, Bar {}
interface FooBar extends Foo, Bar {}
interface Foo extends FooBar { default int bar() { throw new UnsupportedOperationException(); } }
Foo f = () -> 3;
But, assuming method
void doSomething(FooBar x) { ... }
doSomething(() -> 3);
doSomething((Foo)() -> 3);