Java: Out with the Old, In with the New

后端 未结 30 2069
遥遥无期
遥遥无期 2020-12-22 16:11

Java is nearing version 7. It occurs to me that there must be plenty of textbooks and training manuals kicking around that teach methods based on older versions of Java, whe

30条回答
  •  悲&欢浪女
    2020-12-22 16:30

    Q1: Well, the most obvious situations are in the generics / type specific collections. The other one that immediately springs to mind is the improved for loop, which I feel is a lot cleaner looking and easier to understand.

    Q2: In general, I have been bundling the JVM along side of my application for customer-facing apps. This allows us to use new language features without having to worry about JVM incompatibility.

    If I were not bundling the JRE, I would probably stick to 1.4 for compatibility reasons.

提交回复
热议问题