public class Test { interface I { void foo(); } public static void main(String[] args){ I i = UnknownClass::wait; } }