«Back to Home

Core Java

Topics

How Program Internally Works In Java

How simple program works internally

Previously, we learn, how to design and create program in Java. Now, we learn about, how program works internally. Let’s see,

52
 
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

Let’s see how program works.

53
 
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 learns, how it works at runtime.