Java technology's versatility, efficiency, platform portability, and security make
it the ideal technology for network computing. From laptops to datacenters, game
consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!
We consider several important questions:
- Why is Java the leading technology today?
- Why are Java skills in greater demand than skills with any other
- How do Java's future prospects look?
Why is Java in such high demand?
Here are some of the reasons why Java is so popular today.
Java is simple. That simplicity derives from syntax similar to C/C++ and the omission
of complex C/C++ features such as multiple implementation inheritance, pointers,
and operator overloading.
- Java is object-oriented. Java’s object-oriented nature encourages
a developer to think in terms of classes and objects rather than separate code and
data. That class/object focus results in code that is easier to write, easier to
maintain, and easier to reuse.
- Java is network-savvy. A TCP/IP library simplifies the development
of programs that communicate with HTTP, FTP, and other TCP/IP network processes.
Furthermore, the library’s use of the same stream-oriented mechanism for communicating
with remote network processes that file-oriented code uses to communicate with files
on a computer’s local hard drive helps a developer write network code faster.
- Java is interpreted. Java’s compiler translates source code
into class files of bytecode instructions. A virtual machine examines each instruction
and uses that instruction’s meaning to execute an equivalent sequence of platform-dependent
instructions. Interpretation speeds up the development process and simplifies debugging.
- Java is robust. Errant programs do not crash the virtual machine
or corrupt the underlying (native) platform. Robustness is achieved, in part, by
not supporting C/C++ pointers, by providing a garbage collector to automatically
free up dynamically allocated memory (instead of forcing the developer to accomplish
that task), by performing strict compile-time/runtime type checking, and by providing
true arrays with bounds checking.
- Java is secure. Java’s "sandbox" security model
identifies sensitive operations (such as file I/O) that a malicious program can
exploit to harm the native platform, and provides a mechanism for allowing or preventing
access to those operations.
- Java is architecture-neutral. A compiled Java program’s bytecode
instructions target a generic virtual machine instead of a specific platform. Because
each platform-specific virtual machine implementation supplies a consistent interface
to the byte codes, the same Java program runs on diverse platforms (via their virtual
- Java is portable. Portability is achieved through architecture
neutrality and through a strict definition of the language (which permits no implementation-dependent
features). For example, Java’s integer primitive type always means a signed
2’s complement 32-bit integer. In contrast, the C/C++ integer type can be
unsigned, and its size varies according to a platform’s register size (typically
32 bits or 64 bits).
- Java is high-performance. Many virtual machines use a just-in-time
(JIT) compiler to dynamically compile a program’s bytecode instructions into
platform-specific instructions (which execute faster than byte codes) as the program
- Java is multithreaded. Support for threads is built into the language
via thread-synchronization primitives. There is also a thread library.
- Java is dynamic. Java’s use of an interface type to distinguish
between what a programs must do and how that task gets accomplished helps Java adapt
to a continually evolving environment, and makes it easier for vendors to modify
Java libraries without breaking program code that uses those libraries.
The above definition implies that Java is not your average computer language. Unlike
many computer languages, a Java compiler doesn’t translate correct source
code (based on a language specification’s syntax and semantics) to equivalent
executable code that runs directly on Microsoft Windows/Intel, Sun Solaris/SPARC,
or another platform (an operating system and hardware architecture combination).
Instead, Java’s compiler translates correct source code to executable code
that runs indirectly on a native platform via a virtual machine (a software representation
of a hypothetical computer). The virtual machine presents a well-defined interface
to a Java program’s bytecode instructions (operation codes and operands that
have meaning to the virtual machine) and situates between a Java program’s
byte codes and the native platform.
Initially these goals were ambitious and required developers to spend a significant
amount of time testing and debugging their applications running in different virtual
machines on different operating systems, but as time moved forward, so did Java.
Today, moving between modern Java virtual machines, even from different vendors,
is mostly transparent. No longer do you have to think about if your application
will run on Linux or Windows, if you choose to use Java you get both for free, plus
Macintosh, Sun, AIX, HP-UX, and any other operating system for which there is a
Java virtual machine.