The difference is that a plain <T>
means that it can be null
able. (which is represented by Any?
). Using <T: Any>
will restrict T
to non-nullable types.
So the difference is that <T>
is an implicit <T: Any?>
.
The difference is that a plain <T>
means that it can be null
able. (which is represented by Any?
). Using <T: Any>
will restrict T
to non-nullable types.
So the difference is that <T>
is an implicit <T: Any?>
.