Make it generic!

Report a typo

You have the following class:

class NonGenericClass(val value: Any) {    
    fun get(): Any {
        return value
    }
}

Rewrite it as a generic class and rename it to GenericClass. Remember about the naming convention.

Write a program in Kotlin





___

Create a free account to access the full topic