This means that this method call accepts two type parameters: S and D.
The <S, D> is understood as declaring that this method is general and accepts two type parameters, which are then used as placeholders for the actual types in the method signature.
When you call a method, you provide parameters or you get output from the types of expressions that you pass as arguments, for example:
String val = map(10, String.class);
In this case, S is Integer , and D is String
source share