• Post Reply Bookmark Topic Watch Topic
  • New Topic

Type Inference with constructor of Generic class problem  RSS feed

 
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there

I am following this article

http://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html


can any one explain meaning of this line

Note: It is important to note that the inference algorithm uses only invocation arguments, target types, and possibly an obvious expected return type to infer types. The inference algorithm does not use results from later in the program.



Thanks
 
Marshal
Posts: 56610
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does it mean that when you use the <> syntax the formal type parameters must be known to the compiler already?
 
Ranch Hand
Posts: 30
1
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it's pretty clear, it tells you where you can use type inference in Java.
Maybe you can say what exactly didn't you understand or even give an example.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!