Mixed up code

Report a typo

We have an inline function printType() that takes a reified type parameter T. The function simply prints the name of the type at runtime using the simpleName property of the KClass instance.
In the main() function, we call printType() with three different type arguments (String, Int, and Double).
Arrange the code in the correct order. The first will be the function printType.

Reorder lines using drag or arrows. Adjust indentation with left buttons
                printType<Int>()
              
                }
              
                printType<Double>()
              
                inline fun <reified T> printType() {
              
                fun main() {
              
                }
              
                println(T::class.simpleName)
              
                printType<String>()
              
___

Create a free account to access the full topic