Constructor overriding with different parameter types

Report a typo
Hey there! This problem might be a bit unpredictable, but give it a go and let us know how you do!
In Kotlin, considering the Object-Oriented Programming concept of constructor overriding, what will happen if you try to override a constructor of a superclass in the child class but with different parameter types? For instance, see the code snippet below:
open class Parent(val name: String) { } class Child(name: Int) : Parent(name) { }
Select one option from the list

Create a free account to access the full topic