Most Helpful Customer Reviews
Java 7 New Features Cookbook based on 0 ratings. 1 reviews.
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 java.io.File and related classes within java.io 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 java.io 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.