...

/

Using Constants Efficiently

Using Constants Efficiently

Learn how to use constants efficiently in Kotlin.

We'll cover the following...

Since everything in Java is an object (unless it’s a primitive type), we’re used to putting all the constants inside our objects as static members.

And since Kotlin has companion objects, we usually try putting them there: ...