Saturday 27 July 2013

CORE JAVA



Basics of CORE JAVA:


Static Loading :-
A block of Code is loaded into the RAM before it is getting executed.
(ie.. After being loaded into the RAM it may or may not get executed.)
Dynamic Loading:-
A block of code is loaded into the Ram only when it is required to be executed.
Note: - static loading takes place in the execution of structured programming languages.
Ex: - c
Java follows Dynamic loading:
Ø JVM would not convert all the statements of .class file into its executable code at a time.
Ø Once the control comes out from  the method, then it is deleted from the RAM.
And another method of .exe type will be loaded as required.
Ø Once the control comes out from the main (), the main () also will be deleted from the Ram. This is why we are not able to view the .exe contents of a .class file.
Functions of JVM:-
Ø It converts the required part of the byte code into its equivalent executable code.
Ø It loads the executable code into the RAM
Ø Executes this code through local operating System.
Ø Deletes the executable code from the RAM.
Platform Independency:-

Compiled code of a program should be executed in any operating System, irrespective of the OS in which that code has been generated. This concept is known as Platform Independency”.

We know that JVM converts .class file into its equivalent executable code now. If a JVM is in Windows Environment, it converts the .class file into its executable code, That is understood by windows environment only.

Similarly same is the case with UNIX operating System. Thus JVM is platform dependent. But the platform dependency of the JVM is not considered while saying java is platform independent. Because JVM is supplied free of cost through the internet by the Sun Micro Systems.






No comments:

Post a Comment