Integration with Java
Java programs are compiled by a Java compiler into Java bytecode. Java bytecode is analogous to the object file format specified in the Application Binary Interface (ABI). Files containing Java bytecode cannot be executed like ordinary executable files, and they need a special environment to be run.
Java bytecode can only be run within a Java Virtual Machine (JVM). The JVM is itself a process that simulates a working environment for the Java bytecode. It is usually written in C or C++ and has the power to load and use the C standard library and the functionalities exposed in that layer.
The Java programming language is not the only language that can be compiled into Java bytecode. Scala, Kotlin, and Groovy are among programming languages that can be compiled to Java bytecode hence they can be run within a JVM. They are usually called JVM languages.
In this section, we are going to load our already built stack library into a Java program...