package pck; import java.util.List; import static pck.C.foo; import static pck.C.foo1; import static pck.D.foo; import static pck.D.foo1; class C { static void foo(List x) { } static void foo1(List x) { } } class D { static , S> String foo(List x) { return null; } static , S> String foo1(List x) { return null; } } class Main { public static void main(String[] args){ List> x = null; foo(x).toCharArray(); foo1(x).toCharArray(); } }