Java Reference
In-Depth Information
This provides portability to any base operating system platform for which a virtual
machine has been written.
The two-step procedure of compilation and interpretation allows for extensive code
checking and improved security.
Object-oriented
Object-oriented programming (OOP) throughout - no coding outside of class defini-
tions.
The bytecode retains an object structure.
An extensive class library available in the core language packages.
Automatic memory management
A garbage collector in the JVM takes care of allocating and reclaiming memory.
Several drawbacks of C and C++ eliminated
No accessible memory pointers.
No preprocessor.
Array limits automatically checked.
Robust
Exception handling built-in, strong type checking (that is, all variables must be
assigned an explicit data type), local variables must be initialized.
Platform independence
The bytecode runs on any platform with a compatible JVM.
The “Write Once Run Anywhere” ideal has not been achieved (tuning for different
platforms usually required), but is closer than with other languages.
Security
The elimination of direct memory pointers and automatic array limit checking pre-
vents rogue programs from reaching into sections of memory where they shouldn't.
Untrusted programs are restricted to run inside the virtual machine sandbox. Access
to the platform can be strictly controlled by a Security Manager.
Code is checked for pathologies by a class loader and a bytecode verifier.
Core language includes many security related tools, classes, etc.
Dynamic binding
Classes, methods, and variables are linked at runtime.
Good performance
Interpretation of bytecodes slowed performance in early versions, but advanced vir-
tual machines with adaptive and just-in-time compilation and other techniques now
typically provide performance up to 50% to 100% the speed of C ++ programs.
Threading
Lightweight processes, called threads, can easily be spun off to perform multipro-
cessing.
Built-in networking
Java was designed with networking in mind. The core language packages come with
many classes to program Internet communications.
The Enterprise Edition provides an extensive set of tools for building middleware
systems for advanced network applications.
Search WWH ::




Custom Search