Java 7.0 (Dolphin)
Sun is releasing weekly early access snapshots of the complete source, binaries and documentation for JDK 7. These raw snapshot releases let you review and contribute to the Java SE platform as it is being developed. Some possible language changes being considered for Dolphin include:
- property support (for getFoo()/setFoo() pattern)
- method references (a quick way to write an event notification pattern)
- block closures (collection of statements within a statement)
- native XML support
also read:
Java 7.0 New Features
- Closures
Closures are something like C callbacks, a pointer to a function that you can pass as a parameter. In addition to the method, some context around that method is snapshotted to go along with it in the closure.Another way of putting it is a closure is an anonymous function body, that can be declared and passed around as a first-class object, and which can refer to variables from its enclosing scope. The anonymous classes in JDK 1.1 provide closure-like facilities, albeit with tacky syntax. Smalltalk “blocks” are closures.
- JSR 277 Java Module System
- JSR 294 Improved Modularity Support
- JSR 295 Beans Binding
- JSR 303 Beans Validation
- JSR 296 Swing Application Framework
- JSR 203 NIO2JSR 220 Java Persistence APIs
- JSR 255 JMX 2.0
- JSR 262 Web Services Connector for JMX
- JSR 260 Javadoc Technology Update
- JSR 275 Units and Quantities
- JSR 310 Date and Time API
- JSR 308 Annotations on Java Types