See also: EssenceOfObjectOrientedProgramming
The Java language environment is composed of the following parts:
- Java Programming Language
- Compiler (javac)
- Java Virtual Machine (JVM)
To create a Java program you start by writing some source code in the Java programming language. You then run this source code through the Java compiler which creates the byte code, in the form of .class files. The byte code is now ready to be interpreted by the Java Virtual Machine (JVM). This means that Java is both a compiled and an interpreted programming language.
Java is also an Object Oriented (OO) programming language (see EssenceOfObjectOrientedProgramming). It is not a pure OO language as not everything is treated like an object. In Java there is a distinction between objects and primitive types.
Other differences between Java and other programming languages are:
- Memory model: java provides automatic garbage collection, freeing programmers from having to worry (too much) about memory allocation schemes
- Java is a statically typed, dynamically loaded language
- Java does not provide multiple inheritance. Instead, Java uses a single inheritance model, aided by interfaces which can be extended [sic] many times, but do not provide a default implementation of the methods.