Java is a class-based, object-oriented programming language designed for write once, run anywhere (WORA) portability through the Java Virtual Machine (JVM). Originally released in 1995, Java combines strong static typing with automatic memory management, making it a foundation for enterprise applications, Android development, and distributed systems. The language prioritizes readability, stability, and backward compatibility, allowing decades-old code to run on modern JVMs. As of Java 25 (LTS, September 2025) and Java 26 (March 2026), the language continues to evolve rapidly with virtual threads, records, pattern matching, sealed classes, stream gatherers, scoped values, and HTTP/3 support, making it one of the most actively developed platforms in the industry.
What This Cheat Sheet Covers
This topic spans 28 focused tables and 284 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Primitive Data Types
| Type | Example | Description |
|---|---|---|
int count = 100; | β’ 32-bit signed integer β’ default choice for whole numbers β’ range approximately Β±2.1 billion. | |
long big = 9876543210L; | β’ 64-bit signed integer β’ requires L suffix β’ used for timestamps, large counts, or IDs. | |
double price = 99.99; | β’ 64-bit floating-point β’ default for decimal numbers β’ preferred for scientific calculations. | |
boolean active = true; | β’ Logical type holding true or false β’ no implicit conversion to integers. |