import java.util.*; class Test { void test() { Comparator r2 = Test::yyy; Comparator1 c1 = Test::yyy; Comparator1 c2 = Test::xxx; } int yyy(Test... p) { return 1; } int xxx(Test t) {return 42;} } interface Comparator1 { int compare(T... o1); } class Test1 { void test() { Bar2 bar2 = Test1::yyy; } void yyy(Test1... p) {} interface Bar2 { public void xxx(Test1 p, Test1... ps); } }