Never miss a beat

Join my newsletter.

Tag: companion object

Static Methods, Companion Objects, and Testing

Published: 7/18/2018

A companion object sits inside a class definition and houses all the static methods which that class will own. Let's convert a piece of Java code to Kotlin so you can see what I mean.