https://kotlinlang.org logo
#announcements
Title
# announcements
d

douglarek

03/15/2017, 8:11 AM
I have a class in java :`public class A<T> {}`, why can't I define a method as this in A not use generic
T
just use another
E
:
public <E> E a(Class<E> k){ ... }
?
l

lupajz

03/15/2017, 9:11 AM
Copy code
class A<T> {
    fun <E> a(clazz: Class<E>): E { ... }
}
d

douglarek

03/15/2017, 9:35 AM
I am not using kotlin
3 Views