• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What are the most important new Java 7 features?

 
Ranch Hand
Posts: 208
9
Eclipse IDE Firefox Browser Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have a look here: http://programmers.stackexchange.com/questions/193630/summary-of-differences-between-java-versions
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 1090
14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I liked the try with resources and the Fork and Join framework.
 
Rancher
Posts: 1044
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Underscores in numeric literals are clearly syntactic sugar, but, hey, they can be quite comfortable.
 
Ranch Hand
Posts: 39
5
Spring Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 300
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think automatic resource management is very important features, one make your code more robust.
 
Greenhorn
Posts: 3
MyEclipse IDE Python Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
fork join framework, Concurrency improvements(thread pools) and resource management
 
reply
    Bookmark Topic Watch Topic
  • New Topic