When is a parameterized method call useful?
问题 A Java method call may be parameterized like in the following code: class Test { <T> void test() { } public static void main(String[] args) { new Test().<Object>test(); // ^^^^^^^^ } } I found out this is possible from the Eclipse Java Formatter settings dialog and wondered if there are any cases where this is useful or required. EDIT Based on Arne's excellent answer i came up with the following conclusion: In addition to improved type safety as Arne's example illustrates a parameterized