An OpenJDK proposal is set to introduce value classes and objects to Java, allowing for class instances with only final fields and no object identity. This would enable objects to be differentiated by their field values, improve memory footprint, locality, and garbage collection efficiency. The proposal, updated in June 2022, does not yet specify a target version for Java and will not introduce a struct feature or change the treatment of primitive types.
Sort: