The author of the best-selling Java in a Nutshell has created an entire book of real-world Java programming examples that you can learn from. If you learn best "by example," this is the book for you.This third edition covers Java 1.4 and contains 193 complete, practical examples: over 21,900 lines of densely commented, professionally written Java code, covering 20 distinct client-side and server-side APIs. It includes new chapters on the Java Sound API and the New I/O API. The chapters on XML and servlets have been rewritten to cover the latest versions of the specifications and to demonstrate best practices for Java 1.4. New and updated examples throughout the book demonstrate many other new Java features and APIs.Java Examples in a Nutshell is a companion volume to Java in a Nutshell, Java Foundation Classes in a Nutshell, and Java Enterprise in a Nutshell. It picks up where those quick references leave off, providing a wealth of examples for both novices and experts. This book doesn't hold your hand; it simply delivers well-commented working examples with succinct explanations to help you learn and explore Java and its APIs.Java Examples in a Nutshell contains examples that demonstrate:
- Core APIs, including I/O, New I/O, threads, networking, security, serialization, and reflection
- Desktop APIs, highlighting Swing GUIs, Java 2D graphics, preferences, printing, drag-and-drop, JavaBeans, applets, and sound
- Enterprise APIs, including JDBC (database access), JAXP (XML parsing and transformation), Servlets 2.4, JSP 2.0 (JavaServer Pages), and RMI
The book begins with introductory examples demonstrating structured and object-oriented programming techniques for new Java programmers. A special index at the end of the book makes it easy to look up examples that use a particular Java class or accomplish a desired task. In between, each chapter includes exercises that challenge readers and suggest further avenues for exploration.
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