Vidyalelo
Computer Science · Q252

Kotlin Programming MCQ for Competitive Exams, Interviews, and Certifications

Engineering and GATE · Computer Science · question 252

Q252

Kotlin will not compile this code snippet. What is wrong? class Employee class Manager : Employee()

A.
In order to inherit from a class, it must be marked open
Answer
B.
In order to inherit from a class, it must be marked public
C.
In order to inherit from a class, it must be marked sealed
D.
In order to inherit from a class, it must be marked override

Answer: Option A

Solution

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