1.6 How Program Internally Works in Java
1.6 How Program Internally Works in Java
Introduction
In this article, you will learn, how normal program works internally and at the runtime in Java with the
figure, given below-
Previously, we learn, how to design and create program in Java. Now, we learn about, how program
works internally. Let’s see-
First, we use any editor or IDE to write a source code. Afterwards, this source code (.java file) is compiled
by Java compiler (javac) and Java compiler changes the file in Java Bytecodes (.class). Run that file (java)
and get an output.
At a runtime
At the runtime, first, classloader loads the class file, bytecode verifier verifies the code, which is legally
correct and last interpreter reads bytecode file and run it.
Summary
Thus, we learnt, source code is compiled by Java compiler. Java compiler changes the file in Java
Bytecodes. Run the file and also learn, how it works at runtime.