Examveda

In order to subclass the Person class, what is one thing you must do?
abstract class Person(val name: String) {
  abstract fun displayJob(description: String)
}

A. The subclass must be marked sealed

B. You must override the displayJob() method

C. You must mark the subclass as final

D. An abstract class cannot be extended, so you must change it to open

Answer: Option B


This Question Belongs to Computer Science >> Kotlin Program

Join The Discussion

Related Questions on Kotlin Program

What is Kotlin?

A. A new version of Java.

B. A JavaScript framework.

C. A statically-typed programming language for the JVM, Android, and browser.

D. A database management system.