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 email address or mobile phone number.

The Elements of Java(TM) Style (SIGS Reference Library) Reprint Edition

4.1 out of 5 stars 41 customer reviews
ISBN-13: 978-0521777681
ISBN-10: 0521777682
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 On clicking this link, a new layer will be open
$0.01 On clicking this link, a new layer will be open
Buy new On clicking this link, a new layer will be open
$17.04 On clicking this link, a new layer will be open
More Buying Choices
33 New from $5.69 67 Used from $0.01
Free Two-Day Shipping for College Students with Amazon Student Free%20Two-Day%20Shipping%20for%20College%20Students%20with%20Amazon%20Student

Save Up to 90% on Textbooks Textbooks
$17.04 FREE Shipping on orders over $35. In Stock. Ships from and sold by Amazon.com. Gift-wrap available.

Frequently Bought Together

  • The Elements of Java(TM) Style (SIGS Reference Library)
  • +
  • Objects First with Java: A Practical Introduction Using BlueJ (5th Edition)
  • +
  • The Java Tutorial: A Short Course on the Basics (6th Edition) (Java Series)
Total price: $186.70
Buy the selected items together

Editorial Reviews


"This is a great book for the beginner or intermediate developer -- experts should already know this stuff. It will help you create better, cleaner, more easily maintained code. If you work with other developers, I recommend getting several copies for the group...The Elements of Java Style proves that 'Good things come in small packages.' Physically, it's a small book, and weighs in at just 142 pages. However, the positive impact it can have on your work is all out of proportion to its size. That's because the ideas presented aren't limited to a single language, and the way the ideas are presented is very compact. The Elements of Java Style isn't about the code you write, it's about the way you write. Its central premise is that your writing style either enhances or decreases the readability and understandability of the code you write...Over the years, I've read lots of books that I would recommend to different developers, but this book is one of a few that I would recommend to all developers. Pick up a copy, give it a read, and I think you'll agree."

"The Elements of Java Style is a useful resource for those wishing to refine their skills in the language and apply them in a team environment."
Science Books & Films

"By and large there is little to argue about. The Elements of Java Style is perfect in what it tries to achieve."
The Development Exchange's Java Zone

Book Description

Renown author Scott Ambler and a team of Rogue Wave Software developers have joined together to write The Elements of Java Style. While there are many books that explain the syntax and basic use of Java, this book explains not just what you can do with the syntax, but what you ought to do. It illustrates rules with parallel examples of correct and incorrect usage. Not only will Java developers and programmers who read this book write better Java code, but they will become more productive as well. Programmers who take the time to write high-quality code from the start will find it easier to modify it during the development process.

Product Details

  • Series: SIGS Reference Library (Book 15)
  • Paperback: 146 pages
  • Publisher: Cambridge University Press; Reprint edition (January 28, 2000)
  • Language: English
  • ISBN-10: 0521777682
  • ISBN-13: 978-0521777681
  • Product Dimensions: 7 x 0.3 x 9.2 inches
  • Shipping Weight: 7.5 ounces (View shipping rates and policies)
  • Average Customer Review: 4.1 out of 5 stars  See all reviews (41 customer reviews)
  • Amazon Best Sellers Rank: #737,466 in Books (See Top 100 in Books)

Customer Reviews

Top Customer Reviews

Format: Paperback Verified Purchase
A good coding standard should focus on advice that encourages the correct and consistent application of a language. The more widely-adopted a standard is, the more benefit. No less than the Java Language Specification acknowledges this by listing a limited set of naming and usage practices. While the JLS falls far short of establishing a complete coding standard, the naming conventions it established have alone been of great benefit to the Java community. The "Elements of Java Style" nicely fills the gap left by the JLS in other areas, although it too falls a little short in places--thus the 4 star rating instead of 5.
I strongly suggest "Effective Java" by Joshua Bloch as a companion to this book. Whereas the 108 rules in this book focus on style, format and many pearls of practical advice, "Effective Java" provides an excellent set of 57 rules that go much deeper and tackle more advanced aspects of writing correct and consistent code. The two books complement each other well.
Of the 108 rules, the most glaring technical error is rule #99 which promotes the use of the flawed double-check synchronization pattern. Ignore this rule.
The 108 rules are divided into six chapters as follows:
4 General Principles: While I would have added a few, the four here are quite sound.
4 Formatting Conventions: Programmers tend to get weird about code format. After long enough you realize any reasonable and consistently adhered to standard is fine, so just use this well-considered set.
23 Naming Conventions: These are of great benefit as they resolve the ambiguities left by the JLS. I especially like rule #12, "Join the vowel generation".
Read more ›
Comment 39 of 39 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 is the marriage of Rogue Wave Java coding standards with those of Scott Amber. Standards are formulated as brief rules with one or more paragraphs of explanation, illustration, and justification.
The first part of the book is devoted to general principles. There are just a few of these. For example, "Do it right the first time," that is, follow standards whenever you write code, even "throw-away" code.
The second part is devoted to formatting conventions. These have to do with indentation, placement of openning and closing brackets, etc. I second the prohibition against hard tabs--use spaces instead. I've seen code written in an IDE that looks bizarre when viewed in a simple text editor like vi.
The third part is devoted to naming conventions. Good naming conventions make code more nearly self-documenting. An example from this part is "Capitalize only the first letter in acronyms." For example, use "loadXmlDocument()" instead of "loadXMLDocument()," where the obvious exception is constant names which should contain only capital letters.
Java facilitates a deeper integration of code and documentation (via JavaDoc) than most programming languages. The fourth part is devoted to documentation conventions--both JavaDoc and internal comments. If you have ever struggled with the wording of a JavaDoc comment you will appreciate the authors' no-nonsense advice.
The fifth part is devoted to programming conventions. An example from this part is "Do not synchronize an entire method if the method contains significant operations that do not need synchronization," that is, use a synchronized block for the appropriate sequence of statements rather than synchronizing the whole method.
Read more ›
Comment 33 of 36 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 came along at the right time for me. It has all the right ingedients for standardising team coding styles and developemnt methods, including simple descriptions for their use. I recommend it to those in a similar situation or those who are looking to standardise their coding approach and create best practice standards. The real plus factor is that the book is small enough to read in a day, yet useful for a life time!
Comment 11 of 11 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
By A Customer on May 2, 2001
Format: Paperback
For the most part, this book is a great style guide for Java programmers. Most Java programmers' code would benefit significantly by following the conventions listed here.
However, the book gives some bad and confusing advice. The worst advice is the double-check pattern, which is not thread-safe. Some of the other code samples in the Synchronization and Efficiency sections also look like they are not thread-safe. Another example of poor advice is rule 74: Encapsulate enumerations as classes, which doesn't point out that "null" is a valid enumeration value for all such enumerations. The code sample shown in that rule can throw NullPointerException, for example. The advice about "inner classes" is confusing, because it is obvious the advice actually applies to all nested classes, not just inner classes (non-static nested classes).
Overall, the book gives good advice to the experienced Java programmer. I can't recommend this book to the beginning Java programmer, partly because of the above reasons, but mostly because the book mentions so many aspects of the Java language it could easily overwhelm a beginner. Once you've mastered the basics of the Java language, however, this is a good book to take a look at.
Comment 11 of 12 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

Set up an Amazon Giveaway

Amazon Giveaway allows you to run promotional giveaways in order to create buzz, reward your audience, and attract new followers and customers. Learn more
The Elements of Java(TM) Style (SIGS Reference Library)
This item: The Elements of Java(TM) Style (SIGS Reference Library)
Price: $17.04
Ships from and sold by Amazon.com