Translation to Java bytecode
In this last section of the chapter, we are going to see something that will always be useful to us; in fact, it is something that we can always take advantage of if we are curious and want to see what is the same or different between Java and Kotlin. This topic is bytecode.
Bytecode is a code format that is generated after compiling a program written in a high-level language. In this case, both Kotlin and Java are languages that are considered high-level.
Another characteristic of bytecode is that it is code that is designed to be executed by a virtual machine, and we know that both Java and Kotlin use virtual machines. This is what allows bytecode to be executed on any system that has a virtual machine that can read this code, that is, that can interpret it.
We could also describe bytecode as the midpoint between the code we are writing and machine language code, which is the code that computers execute.
Java, especially in its early...