Published in


Learn in 2 minutes: @JvmOverloads in Kotlin.

If you are coming from Java world, you might already have heard about the method overloading in Java. Kotlin, with the help of default parameters and named arguments helps us to reduce the number of overloads that we generally need in Java world.

That means, in Kotlin, you can define a method like

And then call it like



The (retired) Pub(lication) for Android & Tech, focused on Development

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aanand Shekhar Roy

Senior Software Engineer @Joist, Author of Kotlin Programming Cookbook.