Java is a general-purpose, concurrent, class-based, object-oriented computer programming language.
One characteristic of Java is portability, which means that computer programs written in the Java language must run similarly on any hardware/operating-system platform.
In the Java programming language, all code source is written in a text file with the extension . java. These source files are compiled. Class files by the javac compiler.
A .class file does not contain native code for our processor, contains instead of bytecodes, the language machine of the Java Virtual Machine (Java VM). The tool "launch" java start our application in an instance of the virtual machine.
Since the Java VM is available on almost all systems operating the same file. classes can be started on Microsoft Windows, Solaris, Linux, or Mac OS.
The Java platform has two components:
- The Java virtual machine
- The Java application programming interfaces (APIs)
The API is a large collection of software components ready for use. Are grouped into libraries that contain directory of classes and related interfaces such package.
The API and the virtual machine insulate the program from underlying hardware.
As a platform-independent environment, the Java platform can be "slightly" slower than native code. However, advances in compiler and virtual machine reduce differences in performance with native code without threatening portability.