Program internal

Internal Details Of Hello Java Program

 

To understand how the code run internaly, we have learnt about the first program, how to compile and run the first java program. Here we are going learn, what happens while compiling and running java program. MoreOver we will see some question based on the first program.

Illustration code:

class Simple{  
    public static void main(String args[]){  
     System.out.println("Hello Java");  
    }  
}  

 

What happens at compile time ?

 

 

At compile time, Java file is compiled by Java compiler (It does not interact with OS) and converts java code to bytecode.

 

File.java -----> Compliler --------> File.class

 

What happens at run time ?

 

 

At runtime, following steps are performed:

File.class ---> ClassLoader ---> Bytecode Verified ---> Interperter (Similar mean translation) ---> Runtime ---> hardware.

 

ClassLoader: Is the subsystem of JVM that is used to load class files.

ByteCode verified: Checks the code fragments for illegal that can violate access right the objects.

Interperter: Read code stream the excuted the instructions.


View questions of Compiler and Runtime:



0 comments :

Post a Comment

Cancel Reply

About Me

My photo
Tân An, Long An, Vietnam
Hello everyone, I love programming, I love making friends with people all over the world.