Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 1
    This is great for "utility" classes (which you also need to be able to call from Java code so you can't use top-level functions)! I'm surprised that I had to scroll down so much to find this. Commented Mar 22, 2023 at 8:51
  • This solution worked for me, and feels like the cleanest solution to the question, because the usage pattern is the same between Kotlin & Java. Commented Jun 26, 2023 at 18:07