Welcome To Our Site

Anything is free here, let's enjoy today.

Get Update with the new units & News everyday

Wednesday, August 17, 2016

Unit 6: What happens at compile time and run time?

What happens at compile time and run time?



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



What happens at runtime?
- Classloader: is the subsystem of JVM that is used to load class files.
- Bytecode Verifier: checks the code fragments for illegal code that can violate access right to objects.
- Interpreter: read bytecode stream then execute the instructions.



Can we save a java source file by other name apart from class name
Yes, if the class is not public. It is explained in the figure given below:

                                       

To Compile – javac Hard.java
To execute – java Simple

Can we have multiple classes in a java source file
Yes, as shown below







No comments:
Write comments

Hey, Beside the programming part, you can learn other subject free such as Accounting, Network...- FreesEducationsClass
Join Our Newsletter