views:

307

answers:

3

Does anyone know where I can find a discussion on how type inference works when using Generics in Java.

+3  A: 

This is originally specified in Section 15.12.2.7 of the Java Language Specification, as a result of the Java Specification Requests #14.

You may also find various discussions on the subject, such as Generics - type inference from context or Type Argument Inference at the Generics FAQ, etc.

Cheers, V.

vladr
A: 

I recommend Angelika Langer's site for more information on Java generics. She does have a discussion on type inference.

jdigital
A: 

i had to read the book: https://java-generics-book.dev.java.net/

Ray Tayek