The 30 second answer
Modern Java already covers much of the mindset: records for immutable values, streams for pipelines, unmodifiable collections, and virtual threads for simple concurrent code. Choose plain Java when the team and hiring pool are Java-first, when the service is mostly CRUD around Spring Boot, or when build speed and onboarding matter more than expressiveness. Scala pays off for heavy data pipelines and teams already fluent in it.
Java closed much of the gap. Records (final in Java 16) give concise immutable values, streams give pipelines, List.copyOf and Map.copyOf give unmodifiable collections, and virtual threads (final in Java 21) make simple blocking code scale without reactive frameworks. Zalando's own tech radar lists Java and Kotlin in Adopt alongside Scala, so choosing Java there is normal.
Plain Java is usually the better fit when:
- The service is ordinary CRUD. A Spring Boot REST service over PostgreSQL doesn't need actors or advanced functional types.
- The team is Java-first. Hiring, code review and on-call are easier when everyone reads the code fluently. A clever Scala codebase that only two people understand is a risk.
- Build time and tooling matter. Scala compiles more slowly than Java; Zalando wrote a whole post in 2017 about achieving 3.2 times faster Scala compile times.
- You'd only use Scala as "Java without semicolons". If the code would be mutable and imperative anyway, you pay Scala's costs without its benefits.
Watch the ecosystem. In 2022 Lightbend moved Akka from Apache 2.0 to the Business Source License, under which production use needs a commercial license (free for companies under US $25 million in revenue). Apache Pekko is the community fork that stays on Apache 2.0. Mentioning this shows you think about dependencies, not just syntax.
Scala earns its cost when the work is mostly data transformation (indexing pipelines, stream processing, Spark jobs), when concurrency is central to the design, and when the team already knows the language well.
How to answer in an interview. "I'd pick the language the team can run well. Immutability, pure functions and single-owner state are habits I apply in Java too, with records, streams and virtual threads. I'd reach for Scala when the domain is heavy data processing and the team is already fluent."
Sources (6)
- JEP 395: Records (final in JDK 16)openjdk.org
- JEP 444: Virtual Threads (final in JDK 21)openjdk.org
- Zalando Tech Radar (edition 2026.05)opensource.zalando.com
- Zalando Engineering: Achieving 3.2x faster Scala compile time (2017)engineering.zalando.com
- Akka: Why we are changing the license for Akkaakka.io
- Apache Pekko guide: Introduction to actorspekko.apache.org