These features are in Java 1.5 not in Java 1.4( jdk 1.4)
1) Variable Argument List:
2) Enhanced for loop:
3) Autoboxing and Unboxing:
4) Formatted Output:
int i=0;
System.out.printf("i is %d", i);
5) Enhanced Input:
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str=null;
try {
str = br.readLine();
} catch (IOException e) {
e.printStackTrace();
}
int n = Integer.parseInt(str);
System.out.println(n+10);
6) Generics:
7) Static Import:
Monday, December 14, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment