Vidyalelo
Computer Science · Q287

Kotlin Programming MCQ for Competitive Exams, Interviews, and Certifications

Engineering and GATE · Computer Science · question 287

Q287

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
Answer
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

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board