Aimed at those who have some previous Java experience, Java Examples in a Nutshell, 2nd Edition provides an outstanding collection of code samples that are designed to help you improve your programming skills--by studying code that works. With over 150 expert examples that illustrate a wide range of Java APIs, this volume definitely can bring your knowledge of Java to the next level. Many programming titles rely on code excerpts to illustrate key programming concepts. This book reverses that approach by emphasizing the code itself, enhancing it with introductory material and explanations. While some short examples illustrate simple algorithms (such as random-number generation and sorting), many of the examples are for example, how to create a multithreaded Web server, a proxy server, and even a simple Web browser (by using built-in Swing classes for a user interface). These longer examples occupy several pages; generally, they're well-commented models of coding clarity. This second edition adds extensive support for the Java 2 JDK 1.3 standard. Later sections provide sample code on most recent developments in enterprise APIs, including Swing, JDBC, and XML. This text concludes with one of the best short tutorials that you're likely to find anywhere on JSP and servlet programming, including excellent detail on deploying JSP-based Web applications. Although it's designed to be a companion title to Java in a Nutshell and other O'Reilly Java offerings, there's little doubt that this book stands on its own quite well. And, given the short exercises at the end of every chapter that help you expand your command of Java features and APIs, this is a worthy and up-to-date resource for all levels of Java programmers.
David Flanagan looks to be trying to corner the market in Java titles.
Java Examples in a Nutshell is his fourth and is designed to be read in conjunction with the earlier books in which he says, it proved impossible to include all the example code he would have liked.
Like all good coding books it starts with "Hello world", used in this case to illustrate how to correctly set up your Java environment. After a few more basic examples there is a set of exercises which test your grasp of the material. From then on Flanagan tends to refer you to other books in the series to provide background and reference material relevant to the examples under discussion--a great marketing tool. In practice, any basic Java reference will provide this information. What they won't do is provide so many or such well thought out code examples for you to play with.
After the first few chapters you will be glad all the code is available for download as the examples become longer and more complex with ever less text between them. The simple Web browser example alone goes on for many pages.
Despite starting at the absolute beginning Java Examples In A Nutshell goes to the limits with sections on using RMI, JDBC, XML, servlets, JSP and lots more. It covers GUI programming, sound, encryption, internationalisation and other technologies essential for creating practical programs--all with exercises to ensure you really do understand.
While Java code is available from many Net sites the combination of organisation, examples and exercises make this a massively useful book for any budding or working Java programmer. --Steve Patient