I'm just getting started with Kotlin. Does anyone ...
# android
b
I'm just getting started with Kotlin. Does anyone know how good the Android Studio java to kotlin code convertor is?
m
@ben J2K converter is bundled with Kotlin plug-in, just click Code -> Convert Java file to Kotlin file.
b
I was wondering how accurate it is. Can I directly convert and not worry about it, or do I have to check everything it generates?
m
Of course it is not perfect, and converted code can be cleaned up in many places. But, IMO, it's quite accurate and very helpful for learning Kotlin.
b
Ok thanks
b
@ben Never had a problem with it, sometimes I have to manually edit the syntax a bit but for the most part its great
m
This is how I learned Kotlin in the first place! Wrote some Java and saw how it looked in K.
👍 1
p
Fails a lot when you use rxjava