class Test1 { private static final Foo test = new Foo().method(Boolean.TRUE); public static void main(String[] args) { System.out.println(test); } public static class Foo { public Foo method(boolean arg) { return null; } public > Foo method(T arg) { return null; } } } class Test2 { private static final Foo test = Foo.method(Boolean.TRUE); public static void main(String[] args) { System.out.println(test); } public static class Foo { public static Foo method(boolean arg) { return null; } public static > Foo method(T arg) { return null; } } }