Java
Overview
Java is a JVM language noted for portability, mature tooling, and a vast ecosystem for enterprise backends, Android (historically), and big data (Kafka, Hadoop ecosystem). Strong typing, garbage collection, and concurrency primitives (java.util.concurrent) support large teams.
Key concepts
- JVM & bytecode — Write once, run anywhere (with compatible JVMs).
- OOP — Classes, interfaces, inheritance, generics.
- Memory model — GC, weak/soft references,
Optionalfor null-safety style. - Modules (JPMS) — Encapsulation at scale since Java 9.
- Ecosystem — Spring, Quarkus, Micronaut for services.
Class load and execution
Sample: record + stream (modern Java)
import java.util.List;
public record User(String name, boolean active) {}
public class Demo {
public static void main(String[] args) {
var users = List.of(new User("Ada", true), new User("Bob", false));
long active = users.stream().filter(User::active).count();
System.out.println(active);
}
}