Java versions and evolution
32 questions in 10 subtopics.
Java 8 features
Name the main language and library features of Java 8 and explain why default methods were needed for the others to work.A codebase uses Java 8 features heavily but in a dated style: anonymous classes,Optional.get() everywhere, and streams with side effects. You are reviewing it before a Java 21 upgrade. What do you prioritise changing and why?Java 9 to 17 features
List the most useful features added between Java 9 and Java 17 for everyday code, with the release each became final.Rewrite in Java 17 style:if (shape instanceof Circle) {
Circle c = (Circle) shape;
return Math.PI * c.r() * c.r();
} else if (shape instanceof Square) {
Square s = (Square) shape;
return s.side() * s.side();
}
throw new IllegalStateException();
Java 21 LTS features
What are the headline features of Java 21 LTS that became final in that release?Use Java 21 record patterns and switch to write an evaluator for:sealed interface Expr permits Num, Add, Mul {}
record Num(int v) implements Expr {}
record Add(Expr l, Expr r) implements Expr {}
record Mul(Expr l, Expr r) implements Expr {}
Java 25 LTS features
Which features became final in Java 25 LTS that an application developer is likely to use?Which Java 22 to 25 runtime changes matter for performance and operations of services moving from 21 to 25?Your organisation is on Java 21. Build the case for or against moving the fleet to Java 25 within a year, and describe how you would decide.Release cadence and LTS
Describe the Java release cadence since Java 10 and what LTS means. Which recent releases are LTS?Should your organisation follow every six-month Java release or stay on LTS releases only? Argue both sides and give your policy.Why did Java move from multi-year releases like Java 8 and 9 to a six-month cadence, and how has that changed how a company should plan its Java platform?Preview and incubator features
What is the difference between a preview feature and an incubator module in the JDK? How do you enable each?A team wants to use structured concurrency, still in preview in Java 25, in a production service. What is your policy and why?Upgrading across LTS versions
After upgrading from Java 8 to 17, a service fails withjava.lang.NoClassDefFoundError: javax/xml/bind/JAXBContext. Why, and what else was removed in the same way?Plan the upgrade of a Spring Boot 2.7 service on Java 11 to Java 21. What has to change and in which order?Design a fleet-wide process for upgrading 500 services across LTS versions every two years with minimal disruption.Design a standing LTS upgrade programme for a company that will go through Java 25, 29 and later releases over the next decade. What is the sequencing, who owns what, and how do you fund it?Many companies stayed on Java 8 for close to a decade. What did that cost them, and how would you prevent the same situation in your organisation?OpenJDK distributions and licensing
What is the relationship between OpenJDK and builds such as Eclipse Temurin, Amazon Corretto, Azul Zulu, Microsoft Build of OpenJDK and Oracle JDK?Your company uses Oracle JDK on many servers and finance has raised licensing cost concerns. How do you assess options and plan a change?How should a large company decide its Java runtime vendor strategy for the next ten years, considering licensing, support, security patch speed and cloud providers?Java 26 and later features
How do you find out which features are in Java 26 and later releases, and how do you tell final features from preview or incubating ones before using them?Your team wants to adopt a feature that is final in Java 26 but your platform runs Java 25 LTS. What options do you have and what do you recommend?Design a process for evaluating each new six-monthly Java release (26, 27 and so on) for your 300-service fleet without adopting every release.Given the six-month release cadence, how do you explain to executives why the company needs a standing Java platform budget rather than one-off upgrade projects?OpenJDK projects: Amber, Loom, Valhalla, Panama, Leyden
Explain in one or two sentences each what Projects Amber, Loom, Valhalla, Panama and Leyden aim to do, and name one delivered result of each where one exists.A team proposes replacing JNI code with the Foreign Function and Memory API, and another wants to use the Vector API in production. How do you evaluate each?How should Project Leyden's startup and warm-up work affect your platform's choice between JVM with AOT cache, GraalVM native image and CRaC for fast-scaling services?Several long-running OpenJDK projects (Valhalla over ten years, Loom over five) changed Java substantially once delivered. How should a company factor such projects into a long-term technology strategy?No question matches these choices.