Jump to ratings and reviews
Rate this book

In a Nutshell

Java Examples in a Nutshell. Der Beispielband zu Java in a Nutshell

Rate this book
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 substantial: 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. --Richard Dragan

Topics covered:

Library of Java 2 code samples A "Hello world" example Mathematical calculations and algorithms (the Fibonacci Series, factorials, prime-number generation, sorting, exception handling) Basic class design (classes for graphics, random numbers, and a linked list) Java file I/O (including opening, reading, and writing files) Filtering file streams Java threads and multitasking techniques Java networking classes (URLs and connections, sending e-mail) Sample code for custom Web servers and proxy servers Security and cryptography Basic internationalization The Java reflection APIs
Object serialization Swing user-interface design Code for a simple Web browser, based on Swing Tutorial for AWT and Java 2-D graphics Printing techniques Cutting and pasting data in Java JavaBeans (custom components, bean property editors, customizers) Applet basics (including JDK 1.0 event handling and JAR files) Remote Method Invocation (RMI) Sample code for a Multiuser Domain (MUD) server Database and JDBC programming Servlet and JavaServer Pages (JSPs) tutorial XML and Java (including JAXP, SAX 1 and 2, and JDOM)

466 pages, Paperback

First published January 15, 1997

6 people are currently reading
108 people want to read

About the author

David Flanagan

31 books33 followers
David Flanagan is a computer programmer who has spent much of the last 20 years writing books about programming languages. He now works at Mozilla. David lives with his wife and children in the Pacific Northwest, between the cities of Seattle and Vancouver.

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
18 (18%)
4 stars
27 (28%)
3 stars
33 (34%)
2 stars
15 (15%)
1 star
3 (3%)
Displaying 1 - 3 of 3 reviews
3 reviews
July 4, 2009
Useful book-- Flanagan's code fragments are a little more detailed than the snippets you might find in other books of this type. Somewhat old--an update to cover Java 5 or 6 would have been welcome.
Displaying 1 - 3 of 3 reviews

Can't find what you're looking for?

Get help and learn more about the design.