Imagine you moving your code from Java to Kotlin. How would you rewrite this code in Kotlin? Technology Community › Category: Kotlin › Imagine you moving your code from Java to Kotlin. How would you rewrite this code in Kotlin? 0 Vote Up Vote Down VietMX Staff asked 4 years ago Problem public class Foo { private static final Logger LOG = LoggerFactory.getLogger(Foo.class); } Use Static-like approach: class MyClass { companion object { val LOG = Logger.getLogger(MyClass::class.java.name) } fun foo() { LOG.warning("Hello from MyClass") } }