ProLesson 13.8Intermediate4 min readUpdated 30 October 2026
Interview favourites: which new features to know
The modern Java features interviewers ask about most, with one-line answers, and a simple story to tell about the versions you've used.
You don't need to memorise every JEP. Interviewers want to see that you know the important modern features, can explain why they exist, and actually use them. Here's the shortlist.
01The shortlist
| Feature | Version | One-line answer |
|---|---|---|
| Lambdas and streams | 8 | Pass behaviour as values; process collections declaratively and lazily |
| Optional | 8 | An explicit "maybe no result" return type, instead of null |
java.time | 8 | Immutable, thread-safe dates and times with proper time zones |
| Default methods | 8 | Interfaces can evolve without breaking implementations |
List.of / Map.of | 9 | Immutable collections in one line |
var | 10 | Local type inference; still statically typed |
HttpClient | 11 | A standard HTTP/2 client, sync and async |
| Switch expressions | 14 | case -> with no fall-through, returning a value |
| Text blocks | 15 | Multi-line strings with """ |
| Records | 16 | Immutable data classes with generated equals, hashCode and toString |
Pattern matching instanceof | 16 | Test and cast in one step |
| Sealed classes | 17 | A closed set of subtypes that the compiler knows about |
| Virtual threads | 21 | Millions of cheap threads for I/O-bound work |
| Record patterns, pattern switch | 21 | Exhaustive, type-safe data decomposition |
| Sequenced collections | 21 | getFirst, getLast, reversed everywhere |
Unnamed variables _ | 22 | Mark unused variables explicitly |
| Stream gatherers | 24 | Custom intermediate stream operations |
| Compact source files | 25 | void main() without a class, for scripts and learning |
| Scoped values | 25 | Immutable, auto-cleaned context sharing; a better ThreadLocal |
| Flexible constructor bodies | 25 | Validate before super(...) |
Loading the rest of the lesson…