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