import java.io.Serializable; class Test { interface I { void foo(); } interface A { void bar(int i); } { Object o1 = (Serializable & I) () -> {}; Object o2 = (I & Serializable) () -> {}; Object o3 = (I & Runnable) () -> {}; Object o4 = (A & Runnable) () -> {}; Object o5 = (Runnable & A) () -> {}; } } class Test1 { interface A { void foo(); } interface B { void foo(); } { Object c0 = (A & B) ()->{}; } }