You are using a generic method
. Generic methods are methods that introduce their own type parameters. This is similar to declaring a generic type, but the type parameter's scope is limited to the method where it is declared. Static and non-static generic methods are allowed, as well as generic class constructors.
To reference the generic method within your code, you must perform a generic type invocation, which replaces T and U with some concrete value, such as Integer:
SomeClass.<Integer, String>getResponse(requestCode, req);
Sometimes, the explicitly provided types can be left out and the compiler will infer the type that is needed. This feature, known as type inference, allows you to invoke a generic method as an ordinary method, without specifying a type between angle brackets. Read about type inference to know more about this.