DEV Community

Lydia Yuan
Lydia Yuan

Posted on

Understanding Parameter Order in Kotlin's Primary Constructors

Image description

Image description

Kotlin follows positional parameter passing by default. So the first example does not work, the first parameter will be taken as a.

Image description

Top comments (0)