I have a generic method
public <K extends Number> K get()
{
...
}
When I call this method, I use a syntax like:
Integer i = instance.<Integer>get();
However, this is also legal:
Integer i = instance.get();
My question is, is the second method call a form of type inference in Java?
Yes, this is type inference based on the assignment type. It’s specified in section 15.12.2.8 of the JLS: