Understanding Parameter Order in Kotlin's Primary Constructors

lydiayuan

Lydia Yuan

Posted on February 23, 2024

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

💖 💪 🙅 🚩
lydiayuan
Lydia Yuan

Posted on February 23, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related