1. Enhanced 'for' loop .
-Java 5 added a new style of “for” loop (sometimes called "for-in" loops)
– This code loops through each entry in an array or collection object returning one value at a time for processing -- an Iterator is used without an Iterator being defined! 2. Generics We use ‘ArrayList’ ,as example .
Now with this new feature you don't need so much force convert. 3. Enum to associated .You can see many in JDK source 1.5. 4. AutoBoxing Java 5 (Java 1.5) and later automatically “box”and ”unbox” values. – The advent of automatic Boxing and automatic Unboxing greatly simplifies code when using – Boxing and Unboxing is also important since Primitive data and Reference Type data are stored in different places; primitives representing local variables are stored on the stack while objects are stored in heap memory. Example:
5. Variable Argument Lists
New variable argument lists (VarArgs) allow specification of a method that can accept a final parameter of the same type with the number of values to be determined at runtime. Below are some rules related to this. - Only one variable argument list is allowed per method – Variable list must be the last argument defined for the method – The ellipsis "…" is used to indicate that an argument might appear a variable number of times Example:
6. Changeable return value
Before JDK5.0,you can’t change the return value.Now with this new feature You can do it here is an example.
7. Static Imports
Java 5 (Java 1.5) allows import of static items when methods or variables are used repeatedl but JDK 1.4 doesn’t support。
8.Metadata Annotations
Java 5 introduced a method for adding metadata to package and type declarations, methods, 9. Scanner Input
JDK 5.0 does’t have Scanner class,you need use JOptionPane.showInputDialog class。
|
||||||||||||||||||||||||||||||||||||
10. StringBuilder.class |
||||||||||||||||||||||||||||||||||||
|
相关推荐
jdk1.4非安装版,可直接在MyEclipse等IDE工具导入jdk相应的版本。希望对你们有用处。
JDK1.4,1.5,1.6的区别JDK1.4,1.5,1.6的区别JDK1.4,1.5,1.6的区别JDK1.4,1.5,1.6的区别JDK1.4,1.5,1.6的区别JDK1.4,1.5,1.6的区别JDK1.4,1.5,1.6的区别JDK1.4,1.5,1.6的区别JDK1.4,1.5,1.6的区别JDK1.4,1.5,1.6的区别...
j2sdk java jdk java 开发工具 jdk 1.4 免安装版
之前好些人找我要1.4linux版本,现在分享出来
jdk1.4老版的JDK,不常用了,有特殊需要的可以下载。
当操作系统中同时安装了JDK1.4和JDK1.5,如何更改环境变量等设置。
这是JDK1.4的源代码,供学习参考。 它是早期发布的Jdk的源代码。
jdk1.4绿色版本
因为听同事说官网木有jdk1.4下载了
jdk1.4.2.17
压缩包中有两个版本的jdk,1.4和1.7。有需要的朋友可以下载。
java jdk 1.4
JAVA JDK 小版本为JDK1.4.2.17 32位安装包。备份留着自己使用。
JCE无限制权限策略文件,下载后解压,可以看到local_policy.jar和US_export_policy.jar以及readme.txt。将两个jar文件放到%JDK_HOME%\jre\lib\security下覆盖原来文件,记得先备份
jdk1.4,绿色版,免安装版,对于旧的jdk代码可以运行。
自己亲身用过的j2sdk-1_4_2_07-windows-i586-p,jdk-1_5_0_17-windows-x64,jdk-6u38-windows-x64
兼容 jdk 1.4 的json jar包,经过测试支持JDK1.4,记得导入依赖JAR包
jdk1.4
java_jdk1.4 api 中文手册
Memcache for jdk 1.4