Java provides both compiler and a
software machine called JVM for each computer machine. The Java Compiler translates the Java Source
Code (Java program) into an intermediate code known as byte code, which
executes on special type of machine. This
machine is called Java Virtual Machine and exists only inside the computer
memory. The byte code is machine
independent code and can run in any system.
The byte code is not a machine
specific code. Java Interpreter takes
the byte code and translates it into its own system machine language and runs
the results.
Just In Time (JIT): The
Java Virtual Machine is an interpreter that translates and runs each byte code
instruction separately whenever it is needed by the computer program. In some cases it is very slow.
As
an alternative, Java also provides local compiler for each system that will
compile byte code file into executable code for faster running. Java calls these compilers Just In Time
compilers.
Java Standard Library(JSL):
The Java API (Application Programming Interface) is a collection of
classes and methods grouped in the form of packages. JDK 1.2 has 58 packages, it is also known as
Java Standard Library.
The
important Packages in Java are
a) java.lang: It contains the
main language support class. It contains wrappers, strings and basic features
of Java
b) java.util: It provides classes
that support date, time, basic event processing etc.,
c) java.io: It provides reading
and writing data in the form of streams.
d) java.awt: It provides classes
for creating GUI programs.
e) java.applet: It includes set
of classes to support for applet programming.
f) javax.swing: It provides
classes for swing operation programming.
No comments:
Post a Comment