Published in


Daily Kotlin: Static methods

If you come from Java world, you are already familiar of static methods. They prevent us from copying our methods to every class and allows using them without creating an object. But, what if I told you that we don’t have static methods in Kotlin?!

True. But that doesn’t mean that we can’t reap the benefits p\rovided by static methods in Kotlin. There is a way around them. Let’s see how.




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

Recommended from Medium

How to design File storage and synchronization service such as Google drive and Dropbox.

Seven Techniques to Master Error Handling

Sets in python

Securing Traefik Dashboard with Azure AD’s convert feature

Compiling ‘C’ files with ‘gcc’

AWS Solutions Architect-Associate: Preparation & Experience

Azure Log Analytics Custom Logs For Synapse Analytics

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

Aanand Shekhar Roy

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

More from Medium

Support JSON and Polymorphic Classes With Moshi Kotlin Made Easy

Kotlin Coroutines Flow in a nutshell

How and When to convert a Utility function in Kotlin to an Extension Function

Introduction to Kotlin Coroutines