Sanity check about generics when I am trying to le...
# getting-started
m
Sanity check about generics when I am trying to learn more about them. Made some generic class like
Copy code
class Generic<T>(private val value : T)
, i made 2 methods with signatures
Copy code
fun <T: Number> doThing(o : Generic<T>)
and
Copy code
fun doThingDiff(o : Generic<out Number>)
They behave the same when I try creating different instances of generic, I am wondering if those method signatures mean the same thing or if I am missing something. And if they are the same - which is to prefer and when?