Display "Hello, Kotlin!"

Report a typo

Create an anonymous object that inherits the MyClass class.

Override the myMethod() method to display "Hello, Kotlin!" in the console.

Write a program in Kotlin
open class MyClass {
open fun myMethod() {
println("My method")
}
}

val obj = // make your code here
___

Create a free account to access the full topic