Field Guide · language

Also known as: Java

Java is a statically typed, garbage-collected, object-oriented language that compiles to bytecode and runs on the Java Virtual Machine (JVM), giving it genuine “write once, run anywhere” portability across platforms.1

.java javac bytecode JVMJIT + GC Windows Linux / mac
Java compiles once to portable bytecode; each platform's JVM JIT-compiles it to native code at runtime.

Overview

Java source compiles to platform-independent bytecode, which the JVM JIT-compiles to native code as the program runs.2 It is statically typed, thoroughly object-oriented, and garbage-collected. The combination of a portable runtime, strong tooling and decades of libraries has made it one of the most widely deployed languages in large-scale software.

Strengths and trade-offs

Java’s strengths are a massive, mature ecosystem, strong tooling, real cross-platform portability and battle-tested reliability at scale. The common criticisms are that it is verbose and ceremony-heavy, and that the JVM brings slower startup and higher memory use than native code. Modern Java has modernised considerably, and on the same platform Kotlin offers a more concise alternative that interoperates fully with Java code.

Where it’s used

Java runs enormous enterprise systems, Android backends, big-data platforms and long-lived business applications. Its closest counterpart is C# on .NET, which shares almost the same managed, JIT-compiled, garbage-collected design; the choice between them is usually about ecosystem and platform rather than language merit.

Sources

  1. Java (programming language) — Wikipedia, for history and design background. 

  2. The Java platform — Oracle’s official Java site and runtime documentation. 

See also