Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.

  • Apple
  • Android
  • Windows Phone
  • Android

To get the free app, enter your mobile phone number.

Java Pitfalls: Time-Saving Solutions and Workarounds to Improve Programs 1st Edition

3.5 out of 5 stars 19 customer reviews
ISBN-13: 978-0471361749
ISBN-10: 0471361747
Why is ISBN important?
This bar-code number lets you verify that you're getting exactly the right version or edition of a book. The 13-digit and 10-digit formats both work.
Scan an ISBN with your phone
Use the Amazon App to scan ISBNs and compare prices.
Have one to sell? Sell on Amazon
Buy used
Condition: Used: Like New
Access codes and supplements are not guaranteed with used items.
29 Used from $0.01
FREE Shipping on orders over $25.
More Buying Choices
11 New from $10.99 29 Used from $0.01 1 Collectible from $9.80
Free Two-Day Shipping for College Students with Prime Student Free%20Two-Day%20Shipping%20for%20College%20Students%20with%20Amazon%20Student

Save up to 87% on Textbook Rentals Rent Textbooks
click to open popover

Special Offers and Product Promotions

Editorial Reviews


From the Author

See all Editorial Reviews

New York Times best sellers
Browse the New York Times best sellers in popular categories like Fiction, Nonfiction, Picture Books and more. See more

Product Details

  • Paperback: 336 pages
  • Publisher: Wiley; 1 edition (April 20, 2000)
  • Language: English
  • ISBN-10: 0471361747
  • ISBN-13: 978-0471361749
  • Product Dimensions: 7.5 x 0.7 x 9.2 inches
  • Shipping Weight: 1.3 pounds
  • Average Customer Review: 3.5 out of 5 stars  See all reviews (19 customer reviews)
  • Amazon Best Sellers Rank: #3,421,542 in Books (See Top 100 in Books)

Customer Reviews

Top Customer Reviews

Format: Paperback
I've reviewed quite a few Java books about improving the attributes of Java software. Some concentrate on improving the design, others the robustness of software or the performance. While they usually start out promising, by the end of the book you're left with a good understanding of theory but little practical skills. Java Pitfalls : Time-Saving Solutions and Workarounds to Improve Programs, breaks free of that mould, by providing a wealth of techniques and code that has real practical application. The title does not do it justice, however. Not only does the book show you how to improve programs, the advice contained within also saves you time, frustration, and effort.
After reading through even a few pages of tips within the book, you understand that the advice isn't dry theory, but practical advice gained from real-life problems that Java developers face. Michael Daconta, and his co-authors, offer warnings gained from the trenches of software development using Java.

The book is divided neatly into eight sections, covering different aspects of Java programming. A wide range of areas are covered, from the obligatory Java language syntax, to more fun topics like graphical user interfaces (using AWT and Swing), the utilities package and collections, input and output (I/O), and even improving Java performance. The one significant area lacking from the book, in my opinion, is a section on network programming pitfalls, and perhaps other advanced topics like databases. These areas are fraught with pitfalls for the unwary. However, for readers not involved with such areas, this is a moot point, and it leaves more room for other tips.
There are a total of 50 individual pieces of advice, and each is packed full of detailed code examples.
Read more ›
Comment 46 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Paperback
This book explains some of the more common pitfalls in Java programming. While I can't totally disagree with the any of the suggestions on avoiding the pitfalls, the explanations the authors give are often incomplete and confusing.
Take, for example Item 17, where three pages are devoted to explaining what exceptions are. Then there is an example of catching an exception, printing some diagnostics, and re-throwing exactly the same exception. Suddenly, the topic veers to catching OutOfMemoryError. Where is the explanation of the pitfall of mistakenly catching exceptions when they should not be caught, or catching Exception instead of a subclass of Exception? In my experience, these are the pitfalls that Java programmers are more likely to run into. The authors simply didn't explain how 95% of exception handling code should be written.
Another example is Item 12, where synchronization is introduced in five pages. The pitfalls I see Java programmers falling into is believing that only one synchronized method in a class may be called at a time, not understanding how static methods are synchronized, and not understanding memory barriers. The authors skip right over those topics and start discussing how to avoid deadlocks.
In my first hour of looking through the book, I also found the authors confusing references with objects, passing a reference by value with passing an object by reference, setting references to null and calling System.gc() with rational memory management, exponential growth with quadratic growth, simple assertions with design by contract programming, the semantics of the C assert macro with the semantics of a Java assertion method, the Adapter pattern with a simple superclass, and the Java import statement with the #include directive of C.
Read more ›
Comment 19 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Paperback
*)Covers a lot of java topics, from language syntax, API (JFC) to performance issues.
*)Concrete, real examples.
*)OO design issues, as MVC patterns, lazy evaluation, etc.
*)Some issues are java related, which have different behaviors in C++, as "Passing Primitive by Reference", "Boolean Logic and Short-Circuit Operators", well done.
*)Explanation can be deeper, and clearer.
*)No contributions to enterprise java: javabean, JDBC, RMI, Servlet, JSP, EJB.
*)Some explanations are not accurate: for example: Abstract methods must be overridden should be replaced by "Abstract methods must be overridden in CONCRETE classes".
*)No references at the end of the book, <Effective C++>>, <<Design Patterns>> can be listed.
Buy this book with <<Practical Java Programming Language Guide: The Addison-Wesley Professional Computing Series>> (ISBN: 0201616467) and/or <<The Elements of Java Style>> (ISBN: 0521777682).
Comment 21 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Paperback
I can not say enough good things about Java Pitfalls. I actually recieved this book as a gift and was overwhemingly surprised with the amount of applicable knowledge that this book provided me almost immediately after I started reading it.
The premise of Java Pitfalls is primarily to help those who are familiar with the langauge and have had some experience producing applications in Java. As with all programming languages, there are always better, more efficient ways to do things. Some are obvious and usually cross many languages, and some are not so obvious and are very language-specific.
Java Pitfalls points out a lot of common mistakes made in Java development as well as providing optimization and means of producing much cleaner code that runs faster and uses less memory.
The examples are very thorough and the book is very concise in its reasoning for why certain ways of implementing Java are faster than others, complete with benchmark results comparing the common ways of implementing solutions to their more optimal solutions. The book doesn't just show you how to write code more efficiently, it also explains to you why some methods are better than others.
Again, I can't say enough about this book. It's like having a group of experienced Java engineers sittings beside you as your program. A great book all around.
Comment 21 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse

Most Recent Customer Reviews