Java Examples in a Nutshell, 3rd Edition

  Author:    David Flanagan
  ISBN:    0596006209
  Sales Rank:    284894
  Published:    2004-01-01
  Publisher:    O'Reilly
  # Pages:    720
  Binding:    Paperback
  Avg. Rating:    5.0 based on 9 reviews
  Used Offers:    14 from $22.23
  Amazon Price:    $26.37
  (Data above last updated:  2008-11-28 07:17:53 EST)
  
  
Sort customer reviews by:
  
Show All Reviews on Page      Hide All Reviews on Page
   
  
Java Examples in a Nutshell, 3rd Edition
  
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.
                  Reader Reviews 1 - 11 of 11                 
  
  
Review
Date
Review
Rating(5 High)
Review
Helpful
to:
Customer Review Reviewer
Info
Permanent
Link
Reader Reviews Below Sorted by Newest First
10-05-06 5 4\4
(Hide Review...)  Great bang for your buck with useful, very well explained examples.
Reviewer Permalink
This book rocks. I started learning Java about 2 months ago with the Head First Java book, which is AMAZINGLY helpful (even if you know absolutely nothing beforehand). Once I got through that all that I began writing small apps on my own, but found in many cases that the API (Javadoc) was hard to understand because my limited Java knowledge leaves me with no context in many cases. I would think, "ok, it says this class can do this using these methods, and that's what I want, but how exactly do I put this into practice." Java Examples in a Nutshell fills this need perfectly with excellent examples(!), explanations, and clarifications. There's only so much that it can cover, but what it does cover, it covers really well.

I might also add that I bought this book after *returning* Java In A Nutshell because for me it really just seemed like a $50 printout of the API you can read for free at [....].

What I want to say is that, from my own experience, if you are pretty new to Java, and you are clicking well with it, and want a boost to propel you forward even faster, this is an excellent book to buy.
(Review Data Last Updated: 2007-04-12 15:54:33 EST)
10-04-06 5 4\4
(Hide Review...)  Great bang for your buck with useful, very well explained examples.
Reviewer Permalink
This book rocks. I started learning Java about 2 months ago with the Head First Java book, which is AMAZINGLY helpful (even if you know absolutely nothing beforehand). Once I got through that all that I began writing small apps on my own, but found in many cases that the API (Javadoc) was hard to understand because my limited Java knowledge leaves me with no context in many cases. I would think, "ok, it says this class can do this using these methods, and that's what I want, but how exactly do I put this into practice." Java Examples in a Nutshell fills this need perfectly with excellent examples(!), explanations, and clarifications. There's only so much that it can cover, but what it does cover, it covers really well.

I might also add that I bought this book after *returning* Java In A Nutshell because for me it really just seemed like a $50 printout of the API you can read for free at [....].

What I want to say is that, from my own experience, if you are pretty new to Java, and you are clicking well with it, and want a boost to propel you forward even faster, this is an excellent book to buy.
(Review Data Last Updated: 2007-04-11 09:38:48 EST)
02-22-06 5 0\5
(Hide Review...)  Summary of Java
Reviewer Permalink
Great overall summary of Java with examples. Replaces short surveys, tutorials and cookbooks of Java.
(Review Data Last Updated: 2006-10-05 10:16:28 EST)
01-24-06 5 2\2
(Hide Review...)  Very good book of examples of specific Java concepts
Reviewer Permalink
This book should not be expected to substitute as a tutorial for people looking to learn the Java language. Instead, it is a book full of short programs that each illustrate specific concepts in the Java language. If you are needing a tutorial on the Java language in general, I suggest "Head First Java", which is also published by O'Reilly and Associates. You can either read the appropriate chapters of this book in parallel with that one, or look through this book after you finish the Head First Java book. If you already know Java, keeping an updated edition of this book around as a reference is a great idea.
The first four chapters of this book cover the basics of Java, objects, classes, interfaces, input/output, and threads. Thus these chapters remain largely unchanged from the previous edition. Chapter 5, on networking, has been updated to reflect the changes in the language since the last edition, and contains examples of a simple network client, an HTTP client, and a POP client in addition to the programs of the previous edition. Chapter six is a new chapter on The new I/O (NIO) APIs introduced in version 1.4. These provide new features and improved performance in the areas of buffer management, scalable network and file I/O, character-set support, and regular-expression matching. The NIO APIs supplement the I/O facilities in the java.io package, and this chapter does a good job of demonstrating the APIs in action. The next chapter that has had a major overhaul is the chapter on printing. Printing in JDK1.4 was updated considerably and allows you to list specific printers with specific capabilities, query printer status, spool text or image files directly to a printer, and convert image files to Postscript files. There are examples of all of these upgrades in this chapter. The chapter on data transfer has largely been rewritten to reflect that Swing has added support for data transfer between applications. When adding data transfer support to Swing, the goal was to make it easy for developers using Swing components to add clipboard transfer as well as drag and drop to an application. The examples in this chapter demonstrate these concepts very well. There is a completely new chapter on the Java Sound API reflecting the capabilities of that API. In addition to simply playing sounds and sequences, the chapter demonstrates synthesizing MIDI and also real-time MIDI. Finally, the last part of the book on the Enterprise API's has been completely rewritten to reflect all of the changes that have taken place in those API's since the last edition due to the popularity of the Java language in enterprise applications.
Currently, this book is two years old, which is getting a bit long in the tooth for a computer book. This is especially true if you consider the fact that JDK 1.5 has been released since this book was published with its own set of upgrades and nuances, and that JDK 1.6 is scheduled for release in the fall of 2006. I don't know if a fourth edition is planned for the immediate future, so if you can get the 3rd edition used for a low price it might still be worth the investment. If you are a Java novice, it is definitely worth your time and money.
(Review Data Last Updated: 2006-07-07 09:43:03 EST)
06-11-05 1 6\14
(Hide Review...)  Pompous annoying examples.Think twice there are better books
Reviewer Permalink
While writing this I can already imagine the shock and dismay of the Fan crowd with my review. I don't have much time so let me get to the point.
The 1 star I've given it (bcs I had to, preferable I'd rate it 0 stars) mostly pertains to the GUI section of the book. Instead of providing the reader with abundant and clear examples, this author wants to impress the Java geeks by writing an 'smart' generic class that shows all the different aspects of the java GUI elements. Aside from just lame, this is also done most likely because of laziness. I can imagine it's not very exciting to write up the core program structure for every GUI example. But that's just the way a decent author would go about. No need to waste pages by explicitly mentioning everything more then once. Such things can be saved for the example source right ? But mr Flanagan does not share that view. He sits back with his (admittedly entertaining) 'showcomponent' program that loads in all the gui program code (classes) and displays the material. So, again, his 'Java examples' are merely small files with therein declared a certain class without any(!) surrounding program code. (basically similar to what you'd see in the Swing lang spec). All these compiled examples need to be read in (from the command line no less, by his showcomponent class which then actually does all the work of creating the frame, displaying it etc etc etc.

And then cometh the reader, . . . . The moment you have to incorporate some of these lay-out en control components in you're own program this entire structure is obviously useless. Hence you have to struggle to get every component to work after all. The exact thing one is trying to avoid by buying a book. (No, you can't just copy & paste several separate sources together :) ). Basically you end up doing all the work yourself in the end anyway. Henceforth this book, particularly the part of GUI's , dialog's and event handling is of little practical use. I guess it would qualify as some sort of java coffee table book. Interesting functions, a clever introspective class here and there, things you can sit back and debate about with you're friends.
Not with you're collegue(s) when you fighting the deadlines.
While I'm not very proficient in Java, I've coded in c/c++ for far too long. Hence I don't need trivial lectures on what a ip port is. I just need to see some _completed_ (as in finished) programs, to get up and running with particular Java idiosyncrasies & components. If you are in a hurry, and simply have to get something up and running, keep running. Away from this piece of trash.
Go with "Core Java" or some of the Swing books. it'll get you there much much faster.

Edit: Took the flames out of the review. I was rather disappointed with this title at first. (now it's just collecting dust, but at least it doesn't aggravate me either).
If you're a programmer, (like me) you can read the spec by yourself. It's the little things on the outside of the program (event & message que's ,window trickery etc.) that differ from platform to platform. Those are the exact things the author glosses over with this text.
(Review Data Last Updated: 2006-07-07 09:43:03 EST)
06-11-05 1 5\13
(Hide Review...)  Pompous annoying examples.Think twice there are better books
Reviewer Permalink
While writing this I can already imagine the shock and dismay of the Fan crowd with my review. I don't have much time so let me get to the point.
The 1 star I've given it (bcs I had to, preferable I'd rate it 0 stars) mostly pertains to the GUI section of the book. Instead of providing the reader with abundant and clear examples, this pr*ck of an author wants to impress the Java geeks by writing an 'smart' generic class that shows all the different aspects of the java GUI elements. Aside from just lame, this is also done most likely because of laziness. I can imagine it's not very exciting to write up the core program structure for every GUI example. But that's just the way a decent author would go about. But mr Flanagan does not. He sits back with his (admittedly entertaining) 'showcomponent' program that loads in all the gui program code (classes) and displays the material. So, again, his 'Java examples' are merely small files with therein declared a certain class without ANY(!) surrounding program code. (basically what you'd see in the Swing lang spec). All these compiled examples need to be read in (from the command line no less ! (can it get any lamer ?!) by his showcomponent class which then actually does all the work of creating the frame, displaying it etc etc etc.

And then cometh the reader, . . . . The moment you have to incorporate some of these lay-out en control components in you're own program this entire structure is _OBVIOUSLY_ completely useless!. Hence you have to struggle to get every component to work after all. (No, you can't just copy & paste several separate sources, :) ). You end up doing all the work yourself in the end anyway. Henceforth this book, particularly the part of GUI's , dialog's and event handling is next to completely useless !
While I'm not very proficient in Java, I've coded in c/c++ for far too long. Hence I don't need useless lectures on what a ip port is. I just need to see some _COMPLETED_ programs, to get up and running with particular Java idiosyncrasies & components. If you are in a hurry, and simply have to get something up and running, keep running. Away from this piece of trash.
Go with "Core Java" or some of the Swing books. it'll get you there much much faster.
(Review Data Last Updated: 2006-03-25 09:56:21 EST)
01-30-05 5 1\4
(Hide Review...)  Real working Code examples
Reviewer Permalink
Just type these in and learn, learn, learn. Good examples across the board.
(Review Data Last Updated: 2006-07-07 09:43:03 EST)
06-26-04 5 4\4
(Hide Review...)  Excellant
Reviewer Permalink
This is an excellent book covering Java 1.4 with practical examples. The book is divided into four parts: Learning Java, Core Java APIs, Desktop Java APIs, and Enterprise Java APIs. The book is very succinct and to right to the point with its examples. Each chapter starts off with a one to three page introduction of the topic, before heading into the examples. Each chapter introduction gives a high-level overview and history of the need for that API.

The examples are well written and complete. You don't have to search back for prior examples to understand the code. Before each example is an explanation of what the example is trying to do and the concepts it will demonstrate. The comments in the code fully explain why the author is doing something or choosing a particular API method. This book is good for someone who understands the language, but is trying to learn some new APIs. One of the best chapters is the chapter on threads, because it has just about everything you would need to understand about threads to use Java.

This book is a valuable reference. I am sure that I could use this book to understand an API that I have never used before (2D graphics, javax.sound, etc.) by just reading the examples and explanations that accompany them.

(Review Data Last Updated: 2006-07-07 09:43:04 EST)
06-12-04 5 3\3
(Hide Review...)  A must-have for any beginning or experienced programmer
Reviewer Permalink
Now in a newly updated and expanded third edition, Java Examples In A Nutshell is a 720 page instructional compendium by Java expert David Flanagan expertly covers Java 2 Version 1.4, and the tutorial companion to "Java In A Nutshell." Featuring 193 complete examples with practical applications, over 21,900 lines of thoroughly commented, professionally written code, new chapters on the Java Sound API and New I/O API, and much more, Java Examples In A Nutshell is a must-have for any beginning or experienced programmer seeking to learn by doing and hone their skills for adapting to any given programming task. As a tutorial companion, "Java Examples In A Nutshell" does not focus on excessive explanation but rather direct learning through experience; both "Java Examples In A Nutshell" and the more pedantic "Java In A Nutshell" are highly recommended.
(Review Data Last Updated: 2006-07-07 09:43:04 EST)
03-21-04 4 11\11
(Hide Review...)  Great for core Java API - J2EE section weak
Reviewer Permalink
In this 3rd edition, author David Flanagan has updated the book with coverage of Java 1.4. In keeping with the tradition of the other nutshell books, this book is an instant must-have book. This book is divided into 4 sections. The first section is a short yet very nice Java and OO tutorial. This book is not meant to replace your regular tutorial book, but can certainly act as that for someone who already knows the basics and is trying to bone up on the language API and usage.

The second section of the book covers the core Java API, including I/O, NIO, threads, networking, security and cryptography, serialization, and reflection. This section of the book is really solid and includes great working and commented examples of most of the core set of Java API. I really liked the network section as it includes code that will fulfill most of your needs in terms of network related development.

The third section of the book deals with graphics and user-interface including Swing, Java 2D graphics, preferences, printing, drag-and-drop, JavaBeans, applets, and sound. Not being much of a UI guy, I glossed over most of this section but it seemed complete and comprehensive. I know where I am going to turn if I ever need to work with Swing or applets.

The last section of the book includes coverage of the server-side Java or J2EE development, including JDBC, JAXP (XML parsing and transformation), Servlets 2.4, JSP 2.0, and RMI. Being a back-end or server side developer, I spent a lot of time consuming this section and I was very impressed with the quality of the coverage, explanation and examples included in this section. The section starts off with a nice introduction to JDBC, database metadata and includes some nice examples configurable example that are ready for use with little or no modifications. I think that's important to new developers that are getting familiar with an API. In reading the code, it was nice to see the author using the execute() method instead of executeUpdate() or executeQuery() method along with a simple explanation of why he is doing that. Sounds simple, but I can't tell you the number of times junior developers have come to me and asked me about this exact topic.

After JDBC, the book jumps into XML with a nice intro to SAX, DOM, and XSLT. Not a lot of meat here, but XML is always a moving target in terms of the API. I wish this section had a little more to it as it is missing the whole idea of Java-XML data binding which is a useful topic. After XML, the book moves over to Servlets and JSP. Nice intro to servlets and JSP, but leaves you wanting more. I think the whole server-side Java just needs to be another book and I think David should just come up with a Java Enterprise Examples in a nutshell. O'Reilly already has some great books in this category including the Java Servlet and JSP cookbook.

Having said all that, I still really like this book for how it deals with the core API. This book contains 193 complete, documented examples which makes it a must for any junior developer that knows or is learning Java and wants to know how to apply the API. The examples from this book are available for download from the author's website located at davidflanagan dot com.

(Review Data Last Updated: 2006-07-07 09:43:04 EST)
03-14-04 5 8\9
(Hide Review...)  A must-buy book for your Java library
Reviewer Permalink
Target Audience
Java developers who are looking for working examples of code that illustrate specific concepts.

Contents
This book is a companion volume to the Java/Java Enterprise/Java Foundation Classes In A Nutshell books. It provides code examples for many of the classes used in those books.

The book contains the following chapters:

Part 1 - Learning Java - Java Basics; Objects, Classes, and Interfaces

Part 2 - Core Java APIs - Input/Output; Threads; Networking; New I/O; Security And Crytography; Internationalization; Reflection; Object Serialization

Part 3 - Desktop Java APIs - Graphical User Interfaces; Graphics; Printing; Data Transfer; JavaBeans; Applets; Sound

Part 4 - Enterprise Java APIs - Database Access With SQL; XML; Servlets and JavaServer Pages; Remote Method Invocation; Example Index

Review
Often when you are learning Java or exploring a new aspect of the language, it's difficult to make the bridge from the raw documentation to working code. The O'Reilly "Examples In A Nutshell" series is designed to make that transition from theoretical to practical, and David Flanagan's Java Examples In A Nutshell is no exception. It should be an essential part of your personal library if you are a Java professional.

Rather than spend time teaching the reader a particular class, the book assumes that you have one of the other Java Nutshell books for all the details of the class. In this volume, Flanagan jumps right into complete, well-documented examples of code that use those classes, thereby giving you a feel for how they work. Because he documents his code better than most of us do, there isn't that waste of time trying to figure out what the coder intended. The examples are easy to follow, and they are definitely helpful when you are working through the details of an unfamiliar class or concept. I often find myself looking through the chapters when I'm coding just to get a glance at how someone else would code a solution. It's almost like having a partner to bounce ideas off of.

In this latest edition, the author covers some of the new features in Java 1.4 like the New I/O and Sound APIs. Personally, I probably wouldn't do much with the sound code, but the New I/O section will be useful. He also covers the regular expression features which are new in the New I/O API. While I would also want documentation on regular expressions since I'm not a Perl expert, these examples will help me when I get to the point I need to use them.

Conclusion
Quite simply, this should be a "must buy" for your Java library. This book bridges the gap between reference material and your actual coding better than any other book of its kind.

(Review Data Last Updated: 2006-07-07 09:43:04 EST)
  
                  Reader Reviews 1 - 11 of 11                 
  
  
  
  
  
  

Because the data used to generate this site come from outside sources, VeryWellSaid.com cannot guarantee the completeness or accuracy of the data.
Search VeryWellSaid™
Google
Web VeryWellSaid™
New subjects are added every week.
View Subjects Below by:
* Top Selling
 (click category name, left)
* Top-Rated Top Sellers
 (click 'Top Rated', right)
In the news...  
Dubai\UAE Top Rated
Influenza\Bird Flu Top Rated
Iraq Top Rated
Supreme Court Top Rated
All Books Top Rated
Arts Top Rated
Photography Top Rated
Digital Photography Top Rated
Digital Cameras Top Rated
Biography Top Rated
Business Top Rated
Management Top Rated
Marketing Top Rated
Sales Top Rated
Stocks Top Rated
Bonds Top Rated
Real Estate Top Rated
Trading Top Rated
Commodities Trading Top Rated
Time Management Top Rated
Starting A Business Top Rated
Children's Top Rated
Comics Top Rated
Computers Top Rated
PC Top Rated
Mac Top Rated
Programming Top Rated
Design Patterns Top Rated
.Net Top Rated
C# Top Rated
Vb.Net Top Rated
Asp.Net Top Rated
Java Top Rated
Python Top Rated
PHP Top Rated
Perl Top Rated
Javascript Top Rated
Ajax Top Rated
CSS Top Rated
Open Source Top Rated
SQL Top Rated
Databases Top Rated
Oracle Top Rated
MySql Top Rated
Sql Server Top Rated
IIS Top Rated
Apache Top Rated
Linux Top Rated
Windows Server Top Rated
Project Management Top Rated
HTML Top Rated
UML Top Rated
IT Certifications Top Rated
Cisco Certifications Top Rated
MCSE Top Rated
MCSD Top Rated
Cooking Top Rated
Italian Cooking Top Rated
Vegetarian Cooking Top Rated
Wine Top Rated
Engineering Top Rated
Entertainment Top Rated
Health Top Rated
Nutrition Top Rated
Dieting Top Rated
Sex Top Rated
History Top Rated
Military History Top Rated
British History Top Rated
Middle East History Top Rated
Land Battles Top Rated
Naval Warfare Top Rated
Air Warfare Top Rated
9/11 Top Rated
Terrorism Top Rated
Home Top Rated
Mortgage\Home Equity Loan Top Rated
Cars Top Rated
Car Buying Top Rated
Sports Cars Top Rated
Cat Top Rated
Humor Top Rated
Horror Top Rated
Law Top Rated
IP Law Top Rated
Legal History Top Rated
Fiction Top Rated
Oprah's Book Club Top Rated
Medicine Top Rated
Cancer Top Rated
Stroke Top Rated
Heart Disease Top Rated
Fertility Top Rated
Diabetes Top Rated
Pharmacology Top Rated
Back Problems Top Rated
Menopause Top Rated
Thyroid Top Rated
Pain Top Rated
Organic Chemistry Top Rated
Immune System Top Rated
Mystery Top Rated
Nonfiction Top Rated
Outdoors Top Rated
Running Top Rated
Radio Control Models Top Rated
Guns Top Rated
Parenting Top Rated
Divorce Top Rated
Professional Top Rated
Reference Top Rated
Religion Top Rated
Romance Top Rated
Science Top Rated
Physics Top Rated
Chemistry Top Rated
Astronomy Top Rated
Psychology Top Rated
Science Fiction Top Rated
Sports Top Rated
Teens Top Rated
Travel Top Rated
USA Top Rated
Europe Top Rated
France Top Rated
Italy Top Rated
England Top Rated
China Top Rated
All Books Arts Biography Click Here For An A-Z Index Of All 213 Best-Seller Subjects Business Children's Comics
Computers Cooking Engineering Entertainment Health History Home Horror Humor Law Fiction Medicine Mystery
Nonfiction Outdoors Parenting Professional Reference Religion Romance Science Sci-Fi Sports Teens Travel
In Association with Amazon.com

Cache miss
(not cached)