class Test { static void foo() {} static void foo2(int i) {} { Runnable r = Test :: foo; } }