• Post Reply Bookmark Topic Watch Topic
  • New Topic

What are the most important new Java 7 features?  RSS feed

 
Tina Smith
Ranch Hand
Posts: 208
9
Eclipse IDE Firefox Browser Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of all the new Java 7 features covered in the study guide, what would you consider to be the most important (awesome) ones for the real world? For just the exam?
I really love the multi-catch, but don't find I use many of the other ones.

Thanks!
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look here: http://programmers.stackexchange.com/questions/193630/summary-of-differences-between-java-versions
 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well for me anyway, I found the following Java 7 new feature "handy"
try-with-resource
String in switch
NIO2 improved API (like who uses NIO back in Java 1.4 when it was available)


The others are I don't find it that useful at least not yet.

About multi-catch, I honestly prefer the old way.
 
Roel De Nijs
Sheriff
Posts: 11338
177
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For me the most important/handy feature is try-with-resources. Followed by the improved NIO2.0 API.

And from clean, clutter-free, easy-to-read code, I also like the diamond syntax. Certainly when you are writing your own generic classes/methods
 
Chan Ag
Rancher
Posts: 1090
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I liked the try with resources and the Fork and Join framework.
 
Ivan Jozsef Balazs
Rancher
Posts: 999
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Underscores in numeric literals are clearly syntactic sugar, but, hey, they can be quite comfortable.
 
James Pittendreigh
Ranch Hand
Posts: 39
5
Java Linux Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Number one is try with resources, then multi catch (combined with the ability to rethrow more specific exceptions).

The fork join framework is nice and I'm looking forward to finding something to throw at it in the workplace but as yet I'm sturggling! However I do like the recent enhancement to the Executors factory / utility class to provide lots of convienience ExecutorServices for thread pools, very handy.
 
Javin Paul
Ranch Hand
Posts: 297
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think automatic resource management is very important features, one make your code more robust.
 
Fergal Brennan
Greenhorn
Posts: 3
MyEclipse IDE Oracle Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
fork join framework, Concurrency improvements(thread pools) and resource management
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!