Kotlin - Inheritance
In this insolvency we can examine the Inheritance
In Kotlin, the base class is named as "Any", which is the remarkable wonderfulness of the 'any' default polish pronounced in Kotlin
Kotlin moreover gives this usefulness utilizing one catchphrase called ":".
import java.Util.Arrays open brilliance ABC fun assume () print("Oh!! I'm welookups") class BCD: ABC()/inheritence happend the utilization of default constructor entertaining foremost(args: ArrayOutput
) var a = BCD() a.Think()
Goodness!! I am welookupswe are creating two exercises and abrogate one of its element into the kid class.
import java.Util.Arrays open class ABC open fun karma () print("Oh!! I am welookups ") class BCD: ABC()/legacy happens the utilization of default constructor abrogate entertaining luvk() print("I Am from instructive ") a snicker main(args: Array
) var a = BCD() a.Good fortune() Java, Kotlin too doesn't permit a few legacies.I Am from instructional exercise