Java Value Classes Land in OpenJDK PR: Goodbye, Integer vs int Headache?
OpenJDK drops a PR implementing value classes and objects—Java devs may soon stop choosing between objects and primitives.

OpenJDK has dropped a pull request (#31120) bringing value classes and value objects to Java. If you've ever cursed Integer for hogging memory like a hungry hippo or hacked together int[] for performance, this one's for you.
Value classes are like objects that went on a diet and now behave like primitives but with methods. Sounds like a perfectionist's dream: no identity comparison, only value-based, and memory doesn't leak through your fingers. JVM developers finally remembered that not everything is a String or a List.
It's just a PR for now, but it's backed by a full JEP (Java Enhancement Proposal) that promises to change the game for high-load applications. Sure, production is still a long way off—but the fact that value types have reached a language older than many juniors is impressive. Especially if you recall how long we've waited for C#-style value objects.
METABYTE studio comment: While value classes are still in PR, we already have projects where every byte counts. Want to optimize your Java monolith into a reactive microfrontend? We know how to do it, even without value magic—but it'd be more fun with it.
NEXT STEP
Liked the approach?
We apply the same principles to client projects: AI, automation, products that don't die after launch.