How is Kotlin/Java Code is run on a Device
1, The java or kotlin file is package and converted to java-byte-code by java-compiller.
2, When the app is being installed on a device e.g Android phone for the first time, the java-byte-code is converted to machine-code by JVM(Java-virtual-machine). This JVM is found on all device. e.g phone, tablets, computer e.t.c
The JVM has two compillers or engines it used to convert and interpret file. The two engines are; AOT(Ahead of Time) and JIT(Just in Time).
When the Packaged app is being install from playstore or appstore for the first time, the AOT compiler of the JVM is used.
When the app already exist on the device and the user opens it or perform some operations with it, the JIT compiler is used to interprete the code.