File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Features new in Java 7 and the fly likes Cool new features in Java 7: Any caveats? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Features new in Java 7
Bookmark "Cool new features in Java 7: Any caveats?" Watch "Cool new features in Java 7: Any caveats?" New topic

Cool new features in Java 7: Any caveats?

charlsy chuks
Ranch Hand

Joined: May 18, 2012
Posts: 88
Now I like Java 7 and totally like the features its offering: Diamond Syntax, String enabled switch, try-catch with resources,
enhanced syntax for literals etc. I am just sharing a concern I have about the paradigm shift one would have to
engage in whenever the need to work on different projects at the same time arises.

Just imagine a .NET programmer that codes in C# working on a project and all of a sudden is assigned to work on a Java 7 project.
(this is likely sometime in the future ). The changes in Java 7 may not be too drastic but some of them are mind-shifting.

However, it is these changes that make Java 7 tick. I equally foresee professionals writing C# style code in Java 7 or vice versa depending on
which they spend more time with and making mistakes first few times as they violate syntax rules-again this is fun (if you don't have a deadline
breathing heavily down your neck). I guess we will eventually get used to it. Java 7 IS SO COOL!
Martijn Verburg

Joined: Jun 24, 2003
Posts: 3275

C# has actually had the lead on Java for the last few years in terms of its feature set. .NET developers will find things like try-with-resources to be very familiar as they already having the clause in C#. We don't anticipate any problems for our .NET friends coming across to the light side ;-)

Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Abhay Agarwal
Ranch Hand

Joined: Feb 29, 2008
Posts: 1341

One caveat that I can think of - using Diamond operators. Using Diamond operator reduces code readability.

Oracle certified Java 8 Programmer I (1Z0-808), Oracle Java Web Service Developer (1z0-897), Oracle certified Java 7 Programmer, SCJA 1.0, SCJP 5.0, SCWCD 5.0, Oracle SQL Fundamentals I, CIW Certified Ecommerce specialist
I agree. Here's the link:
subject: Cool new features in Java 7: Any caveats?
jQuery in Action, 3rd edition