Tip: How to show Java equivalent for Kotlin code

It’s important to understand how Kotlin code works and how it influences performance. Fortunately, IntelliJ and Android Studio allow to instantly see bytecode and Java equivalent.

Display bytecode: Tools -> Kotlin -> Show Kotlin Bytecode
Or just: cmd + shift + A (Mac) / ctrl + shift + A (Windows) and type “Kotlin Bytecode”

Search for action “Kotlin Bytecode”
Bytecode for data class

Display java equivalent: just click “Decompile” button on the top of “Kotlin Bytecode” window.

Java equivalent for Kotlin code

PS. Decompile button is available only if you have installed and enabled plugin “Java Bytecode Decompiler”

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store