升★★了,放分庆祝,为了给大家放技术分,请先回答问题:JDK5.0比之前的版本增加了些什么特性

解决方案 »

  1.   

    快快乐乐来接分,恭喜“边城狂人”了~~语言特性增加了:1. 泛型
    2. 变参
    3. 自动装拆箱
    4. foreach 循环
    5. 静态导入
    6. 元注释其他还有什么我就想不起来了。至于新增加的类,我比较熟悉的就是 Formatter、Scanner 了。
      

  2.   

    呵呵,语言特性,漏了个枚举。JDK 5.0 的新特性
    http://java.sun.com/j2se/1.5.0/docs/relnotes/features.html
      

  3.   

    Class File增加了8个attribute:「EnclosingMethod」 
    「Signature」
    「LocalVariableTypeTable」
    「RuntimeVisibleAnnotations」
    「RuntimeInvisibleAnnotations」
    「RuntimeVisibleParameterAnnotations」
    「RuntimeInvisibleParameterAnnotations」
    「AnnotationDefault」 http://www.microsoft.com/taiwan/msdn/columns/DoNet/Java2V5Lang.htm
    其中几个用javap还是经常能看到的~
      

  4.   

    JDK1.5则主要是在语言的层面上对java语言的功能进行加强