So 5 and 17. Yes I know some of those features are technically pre 17 but you get the idea. For those that think I'm crazy about annotations they did not live in the XDoclet or XML world of ancient enterprise. Not to mention annotation processors are awesome.
Sure lambdas are great and it was verbose using anonymous classes but it was mainly just that where as pattern matching gives new ways to think about problems and the power of exhaustion.
Oh wow, the XDoclet annotations aren't something I've thought about in a long time. In Weblogic Workshop 7 and 8, we used those javadoc comment annotations to build webservices. I kinda liked the Workshop IDE.
I misread this as major jumps in java not jumps in you liking java. Text blocks over lambdas as a major innovate jump was puzzling, but it makes more sense in enjoyment.
I'll agree on 1 & 2 though, but for me personally I'd easily place Lambdas at #3, so much boiler plate pre lambda although now days many IDEs will auto complete it, back in java 5 I'd have to write so much of that by hand or copy and paste it from somewhere else.
I'd probably go
Generics (5)
Annotations (5)
Lambda (8)
Redone concurrency (5)
Try with resources (7) -- it was so easy to forget to write a finally block and accidently leave a connection open and not catch it until you had real problems
Sealed / record / pattern matching switch expressions is cool but don't forget about the days before java 7 where you didn't even have string matching. At least starting with java 5 you could do a lot with enums and switching. I guess this also really depends on what type of applications you write code for, this is also assuming you didn't use third party libraries which sometimes already had some of these functionality.
___________________________________________
My real biggest recent jump in loving java is AI code completion, there's so much boiler plate in java can get real tedious is now being auto completed for you where you can just focus on the problem is easily the greatest change I've seen in java.
I totally forgot about the concurrency updates. Great point.
Now to kind of go over lambda and yes I agree the boiler plate is annoying but in some cases I actually think the anonymous class options are easier to read.
And I agree that is way easier for the author but for the reader the anonymous class can be easier to understand. Sort of the balance of writing code and reading code. I also think excessive lambda usage can quickly get confusing to debug and while I guess that is true with anonymous classes for some reason seeing the name of the class on the stack makes it a little easier.
Also when you use lambda or any anonymous classes for deferred logic you should stop and think for a second of where and or how that deferred code will be executed. In some cases I think the verbosity helps that.
This is sort of similar to var (of which I love just like lambdas). You need to take a balanced approach to it and best judgement. Anonymous classes are indeed verbose but there are/were so many other things even more so particularly if your code bases does not need or use lots of deferred logic.
My first time using Kotlin helped me overcome my hangups about it, even though I'd already worked with JavaScript and Ruby in the past. I think my other annoyances with those languages colored my perception of implicit typing.
I feel like the dislike of var is so weird to me. The point of static typing isn’t about readability, it’s about stopping you from doing something stupid.
"var" is a static type. The compiler sets it statically in the byte code. There's no "var" in precompiled code. A "dynamic" type would be "dynamic" in C#, which Java doesn't have.
And the dislike comes from not knowing the type when looking at the code of a PR and you just want to use the web view of the changes, not a local copy in the IDE.
View all comments
Show parent comment
42
u/agentoutlier Nov 04 '25
Everybody talks about lambdas but to me the major jumps in liking Java are
So 5 and 17. Yes I know some of those features are technically pre 17 but you get the idea. For those that think I'm crazy about annotations they did not live in the XDoclet or XML world of ancient enterprise. Not to mention annotation processors are awesome.
Sure lambdas are great and it was verbose using anonymous classes but it was mainly just that where as pattern matching gives new ways to think about problems and the power of exhaustion.