Can we override default value of parameter?

Override Default Values. This is not allowed and results in a compiler error. Overriding functions cannot specify default values for their parameters . Kotlin requires that default values can only be specified in the base class functions.

Sizin İçin Seçtik  How do you make an optional parameter in Java?

Leave a Reply

Your email address will not be published. Required fields are marked *