Default values are specified in the header of a function (declaration or definition) by adding an equal sign (‘=’) followed by default value at the end of a parameter declaration.
Read moreCan 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.
Read moreCan we give default value in function with optional positional parameter?
OptionalAttribute parameters do not require a default value .
Read more