If I want to partially / gradually make changes to the .java class with my Kotlin additions / changes.

First, is it possible? I do not want to immediately translate the class through hotkey .

Secondly, how best to do it.

    1 answer 1

    You cannot make changes to the java class by embedding kotlin code into it, because kotlin creates its class with kt extension. You can either write a full class on kotlin or write extensions for java classes on kotlin

    • can you please write a little bit more about writing extensions for java classes on kotlin? - Morozov
    • In Cotlin there is such a thing as Extensions. This makes it possible to extend the class without inheritance. Kotlinlang.org/docs/reference/extensions.html - pavel163