Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Java is an object-oriented programming language developed by Sun Microsystems in 1995. The main advantage of the Java programming language is its write once, run anywhere approach. Java applications are compiled to bytecode that can be executed on any Java Virtual Machine (JVM), regardless of the computer processor architecture. JVM is a software program that will emulate a computer processor and execute the bytecode. This allows Java applications to be platform-independent.
Unlike traditional compilers that generate machine code for a specific platform, Java compilers generate code (bytecode) for the JVM. The JVM acts as an interface between the Java and the physical hardware. Since execution of the bytecode requires an interpretation step as well, Java is considered both a compiled and an interpreted programming language. Because of this Java programs could run slow, and this is its main disadvantage. Just In Time (JIT) compilers and new performance optimization techniques are helping to mitigate some of the Java performance problems.