Java 7.0 New Features

转自http://www.javabeat.net/javabeat/java7/index.php。

此篇文章提供了Java 7.0的新的重要特性介绍。 Java 7.0也是自Java 5.0做重大改变(泛型和并发包)后的又一次重大变化。
语言规范将进一步演化(C#演化的太快了)。尤其是闭包(Closures)的引入,使Java语言也能象C# 3.0语言一样便捷的进行Lamda运算。

从语言变化上来看,property关键字可能得到支持. 通过闭包,可以进行lamda运算,并进一步简化匿名类的使用。纯XML支持。

从API来看,NIO得到进一步提升,持久化框架将被加入到JSE,等等。

当然,离Java 7.0发布第一个版本还有些时间,据Danny Coward(制定Java 7.0规范的头)说,他们的目标是在2009年一月份发布第一个版本。让我们等待那一时刻Java带给我们新的惊喜。

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

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 NIO2
  • JSR 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

转载于:https://www.cnblogs.com/believeit/archive/2008/10/09/2183186.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值