https://kotlinlang.org logo
Title
j

Joan Colmenero

07/02/2019, 3:01 PM
What's the difference between :
interface BasePresenter<in T : BaseView> {
    fun attachView(view: T)
}
And
interface BasePresenter<T> {
    fun attachView(view: T)
a

am

07/04/2019, 4:24 AM
when u specify
in:
for generic it means that you need to pass it as a parameter for any function but you cannot use that to return any value of the type specified to function where as when you just add
T
you can use the type as a parameter as well as return type to any function