Skip to content
Veltoryx Technologies
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

FeatureVersionOne-line answer
Lambdas and streams8Pass behaviour as values; process collections declaratively and lazily
Optional8An explicit "maybe no result" return type, instead of null
java.time8Immutable, thread-safe dates and times with proper time zones
Default methods8Interfaces can evolve without breaking implementations
List.of / Map.of9Immutable collections in one line
var10Local type inference; still statically typed
HttpClient11A standard HTTP/2 client, sync and async
Switch expressions14case -> with no fall-through, returning a value
Text blocks15Multi-line strings with """
Records16Immutable data classes with generated equals, hashCode and toString
Pattern matching instanceof16Test and cast in one step
Sealed classes17A closed set of subtypes that the compiler knows about
Virtual threads21Millions of cheap threads for I/O-bound work
Record patterns, pattern switch21Exhaustive, type-safe data decomposition
Sequenced collections21getFirst, getLast, reversed everywhere
Unnamed variables _22Mark unused variables explicitly
Stream gatherers24Custom intermediate stream operations
Compact source files25void main() without a class, for scripts and learning
Scoped values25Immutable, auto-cleaned context sharing; a better ThreadLocal
Flexible constructor bodies25Validate before super(...)

Loading the rest of the lesson…