GeeCON 2025: Bazlur Rahman - Breaking Java Stereotypes: It’s Not Your Dad’s Language Anymore
GeeCON 2025: Bazlur Rahman - Breaking Java Stereotypes: It’s Not Your Dad’s Language Anymore.
Summary
### Overview In this GeeCON 2025 lightning talk, Bazlur Rahman challenges long-standing stereotypes that Java is slow, verbose, and heavily burdened by boilerplate. Inspired by a conversation with a traveler who hadn't used Java in 15 years, Rahman demonstrates how modern Java has evolved rapidly while preserving incremental and backward-compatible changes—unlike languages that introduce breaking upgrade paths.
### Key Topics - **Reducing Ceremony and Boilerplate:** Transitioning from traditional verbose entry points to streamlined syntax for beginners. - **Data Modeling and Control:** Using records and sealed classes to create clean, expressively constrained domain models. - **Pattern Matching and Readability:** Utilizing modern switch expressions, record deconstruction, unnamed variables, and text blocks. - **High-Throughput Concurrency:** Comparing traditional platform threads against modern virtual threads under high socket loads. - **Native Interoperability:** Replacing JNI with the modern Foreign Function & Memory API.
### Technical Details - **Instance Main Methods and IO:** Rahman shows the reduction of boilerplate in `main` methods for beginners and scripting. Developers can drop `public`, `static`, class wrappers, and `String[] args`, reducing the entry point to a simple `void main()`. He also highlights the new `IO` class, providing convenience methods like `println` and `readLine`. - **Records & Sealed Classes:** Records replace 50+ lines of standard POJO boilerplate (constructors, getters, `equals`, `hashCode`) with concise single-line declarations. Sealed classes and interfaces introduce controlled inheritance using the `permits` clause, allowing library authors to explicitly restrict which classes or records can extend or implement them. - **Pattern Matching & Deconstruction:** Modern switch constructs allow pattern matching directly on object types, returning values directly. Rahman demonstrates record deconstruction within switch statements and using unnamed variables (underscores `_`) to discard unused components (e.g., ignoring issue numbers in a magazine record or author metadata in book summaries). - **Virtual Threads Demo:** Rahman demonstrates a multi-threaded socket server subjected to a simulated 10,000-connection load. Using traditional platform threads, the server fails due to resource exhaustion. Switching to `ofVirtual()` allows all 10,000 connections to succeed seamlessly. During Q&A, he clarifies that platform threads remain necessary for CPU-intensive tasks, whereas virtual threads are optimized for I/O-intensive workloads where threads otherwise sit idle waiting for network or database responses. - **Native Interop & Project Mentions:** He references projects such as Panama, Valhalla, and Leyden, and discusses the Foreign Function & Memory API, which provides a clean Java API to call native C/C++ code without cumbersome JNI. He notes it is targeted for standard release in JDK 25 after being available under preview flags in JDK 23 and 24.
### Takeaways Modern Java is concise, highly performant, and competitive with languages like Kotlin and Go. Backed by a vast global developer ecosystem and massive enterprise server-side deployments, Java continues to evolve rapidly while maintaining robust backward compatibility.
Related talks
geecon conference·57 min
GeeCON 2025: Bazlur Rahman , Syed M Shaaf - Java+LLMs: A hands-on guide to building LLM Apps in Java
GeeCON 2025: Bazlur Rahman , Syed M Shaaf - Java+LLMs: A hands-on guide to building LLM Apps in Java.
PROIDEA Events·40 min
Brian Vermeer
Brian Vermeer analyzes JDD 2021: Live hacking: Breaking into your Java web app.
geecon conference·51 min
GeeCON 2025: Ron Veen - Java 25: Unleashing the Power of Streams.


