29Nov/090
Java 7 to be released
Java being one of the most flexible languages has always been a boon to programmers. Now, good news for all developers, Java is set to release its next version-Java 7.It is said to be released in the latter half of 2010.Of course it’s a hard waiting, still something is going to turn around much more worthy. They have announced a few new features that one can expect in this release. I have listed out some here.
- Underscores in numeric literals
int one_thousand = 1_000;
- Automated resource management
try (BufferedReader br = new BufferedReader(new FileReader(path)) {
return br.readLine();}
- Switch with strings
switch(p){
Case “dog”:
func ();
Case “cat”:
func ();}
- Language support for collections
List<String> list = ["item"];
String item = list[0];
Set<String> set = {"item"};
- Binary literals
int binary = 0b1001_1001;
- Simplified Varargs method invocation
This is the list of completed features. Much more are yet to come.