1.

In Kotlin, the function to be overridden must be ______________(a) Private(b) Open(c) Closed(d) AbstractThe question was posed to me by my school teacher while I was bunking the class.My query is from Overriding Member Functions topic in chapter Member Functions & its Types of Object Oriented Programming

Answer»

Correct option is (b) Open

Explanation: The FUNCTION to be OVERRIDDEN must be open. This is a condition in KOTLIN for any function to be overridden. This avoids accidental overriding.



Discussion

No Comment Found

Related InterviewSolutions