Java 7 New Features Cookbook

Java 7 New Features Cookbook

by Richard M. Reese, Jennifer L. Reese


Choose Expedited Shipping at checkout for guaranteed delivery by Tuesday, February 26

Product Details

ISBN-13: 9781849685627
Publisher: Packt Publishing
Publication date: 02/23/2012
Pages: 384
Product dimensions: 7.50(w) x 9.25(h) x 0.79(d)

Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews

Java 7 New Features Cookbook 4 out of 5 based on 0 ratings. 1 reviews.
Boudville More than 1 year ago
Remember when java came out in 95-6? During next 10 years, it rapidly improved, both with the intrinsic language and with the available default set of libraries that came with the standard distributions. So what is there to say about java 7? The overall impression of this book is that you get a lot of useful fine tuning. Many incremental improvements that can make your code more concise, and thus more understandable and less error prone. A large set of changes deals with paths of files in a filesystem. You have probably had to do grungy futzing around with and related classes within to get out of the jvm and access and manipulate the filesystem. Java 7 offers java.nio.file.*, with a plentitude of nifty classes. One immediate point is that these treat both the unix and Microsoft Windows cases of how filesystems are represented. Indeed, the code snippets cover these cases. Reassuringly, there is backward compatibility with the classes. But programmers are encouraged by the text to migrate to the next versions. One cool convenience function is the ability to normalise a path, which might have redundant cases of '.' and '..' embedded in their strings. Making a standard form enables more robust comparisons and other manipulations. But maybe the biggest new thing with paths is the ability to use symbolic links. These have been a part of unix for over 25 years. So it is a little puzzling why we had to wait till 2011-2 to get them handled properly by the 7th [!] major release of the language. Better late than never, no doubt. An entire chapter is devoted to improved handling of file management and security, including integrating the use of Access Control Lists. Roughly half the book deals with the filesystem. While the GUI changes are relatively limited. Now you can vary the opacity of a window, or control its shape. Another related feature is the means to vary the gradient of a partially translucent window. It does seem that GUI changes are saturating, unless there is some conceptual breakthrough for a future java.