The Java Virtual Machine
The WORA principle is possible because of the Java Virtual Machine (JVM).
A virtual machine is software that emulates a physical machine. In traditional
programming
languages, code is compiled into machine language for a specific
platform. In Java, code is compiled into a virtual machine language called
bytecode. The JVM acts as an intermediary between bytecode and the
underlying physical machine.
Every platform that supports Java has its own implementation of the JVM.
Java applications are portable because every
JVM adheres to a standard
interface. The distribution package of the JVM and standard libraries is called
the Java Runtime Environment (JRE). The distribution package of the JRE and
development tools, such
as the compiler and debugger, is called the Java
Development Kit (JDK).
Procedural Programming vs Object-Oriented Programming
Procedural programming is a style of writing code that
executes a series of linear
procedures to produce a result. Object-oriented programming is a style of writing
code that uses objects to encapsulate state and behavior. Procedural code
is easier to use in small projects or in multithreaded
environments due to its
stateless nature, but object-oriented code is far more flexible and easier
to maintain.