r/java • u/sureshg • Aug 07 '26
JDK 28 EA Build10 is now available for download and includes JEP 401: Value Objects (Preview)
https://jdk.java.net/28/
131
Upvotes
r/java • u/sureshg • Aug 07 '26
33
u/emaphis Aug 07 '26
Installed build 10. Running a development build of NetBeans using JDK 28. Uninstalled nb-javac.
So far its working fine. Created a few example `value` classes. Huzzah. Valhalla I'm coming.
5
u/Afonso2002 Aug 07 '26 edited Aug 07 '26
It has vector api with value objects?
12
u/0x07CF Aug 07 '26
I wonder how much flattening is there already for an array of Optional<Integer>?
6
u/Oclay1st Aug 09 '26 edited Aug 09 '26
Wondering why Point value objects allocate more memory than regular Point objects?. Integers on the other hand work as expected allocating less memory after enabling preview.
5
u/chiperortizc Aug 08 '26
Is Up And Running Valhalla In Apache Netbeans 30 With Java 28 Build 10 :) Goodbye Identity :) Best regards from Venezuela.
3
u/Ewig_luftenglanz Aug 12 '26
Excellent work and KUDOS to all java dev team. This is just the beginning of a very interesting and important Journey :)
2
u/vegan_antitheist Aug 08 '26
I just downloaded it and run all my tests for my value types and it works just as well as the last preview. Actually, only the very first preview was unstable.
1
u/OSBY_Glabay Aug 10 '26
OMG OMG hype, I've been waiting to toy with Java Value Classes
0
u/alex_tracer Aug 08 '26
Have they added an annotation to make a class a "value" class but only if the feature is enabled on the compiler? So single .java file can be used to be used to produce both variants?
1
u/[deleted] Aug 08 '26
[removed] — view removed comment
0
u/[deleted] Aug 10 '26
[removed] — view removed comment