Join Amazon Prime and ship Two-Day for free and Overnight for $3.99. Already a member? Sign in.
The Elements of Java Style and over 300,000 other books are available for Amazon Kindle – Amazon’s new wireless reading device. Learn more

 

or
Sign in to turn on 1-Click ordering.
 
 
More Buying Choices
74 used & new from $0.46

Have one to sell? Sell yours here
 
   
The Elements of Java Style
 
 
Start reading The Elements of Java Style on your Kindle in under a minute.

Don’t have a Kindle? Get yours here.
 
  

The Elements of Java Style (Paperback)

by Allan Vermeulen (Author), Scott W. Ambler (Author), Greg Bumgardner (Author), Eldon Metz (Author), Trevor Misfeldt (Author), Jim Shur (Author), Cao Tieou (Translator), Alan Vermeulen (Author), Patrick Thompson (Author) "While it is important to write software that performs well, many other issues should concern the professional Java developer..." (more)
Key Phrases: javadoc utility, volatile classes, stable packages, Sun Microsystems, Engineering Notebook, Robert Martin (more...)
4.2 out of 5 stars See all reviews (33 customer reviews)

List Price: $15.99
Price: $14.39 & eligible for FREE Super Saver Shipping on orders over $25. Details
You Save: $1.60 (10%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
Upgrade this book for $2.99 more, and you can read, search, and annotate every page online. See details
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.

Only 4 left in stock--order soon (more on the way).

Want it delivered Monday, July 20? Choose One-Day Shipping at checkout. Details
30 new from $5.99 44 used from $0.46
Also Available in: List Price: Our Price: Other Offers:
Kindle Edition (Kindle Book) $9.99
Paperback (Bargain Price) 9 used & new from $8.20

Special Offers and Product Promotions


Frequently Bought Together

Customers buy this book with Effective Java (2nd Edition) (Java Series) by Joshua Bloch

The Elements of Java Style + Effective Java (2nd Edition) (Java Series)
  • This item: The Elements of Java Style by Allan Vermeulen

    In Stock.
    Ships from and sold by Amazon.com.
    Eligible for FREE Super Saver Shipping on orders over $25. Details

  • Effective Java (2nd Edition) (Java Series) by Joshua Bloch

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details


Customers Who Bought This Item Also Bought

The Elements of UML(TM) 2.0 Style

The Elements of UML(TM) 2.0 Style

by Scott W. Ambler
4.1 out of 5 stars (13)  $14.39
Java In A Nutshell, 5th Edition

Java In A Nutshell, 5th Edition

by David Flanagan
4.2 out of 5 stars (32)  $29.67
The Elements of C++ Style (Sigs Reference Library)

The Elements of C++ Style (Sigs Reference Library)

by Trevor Misfeldt
4.5 out of 5 stars (2)  $12.47
Head First Design Patterns

Head First Design Patterns

by Elisabeth Freeman
4.6 out of 5 stars (275)  $29.67
Head First Java, 2nd Edition

Head First Java, 2nd Edition

by Kathy Sierra
4.4 out of 5 stars (241)  $29.67
Explore similar items

Editorial Reviews

Review
'The Elements of Java Style is perfect in what it tries to achieve. Each rule is sensible, hardly any are debatable, and there is no excuse for ignoring any of them.' JavaZone Book of the Week --This text refers to an out of print or unavailable edition of this title.

Review
"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."
Javalobby

"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

See all Editorial Reviews

Product Details

  • Paperback: 142 pages
  • Publisher: Cambridge University Press (January 2000)
  • Language: English
  • ISBN-10: 0521777682
  • ISBN-13: 978-0521777681
  • Product Dimensions: 6.8 x 4.3 x 0.4 inches
  • Shipping Weight: 4 ounces (View shipping rates and policies)
  • Average Customer Review: 4.2 out of 5 stars See all reviews (33 customer reviews)
  • Amazon.com Sales Rank: #289,202 in Books (See Bestsellers in Books)

Inside This Book (learn more)



Books on Related Topics (learn more)
 
 

What Do Customers Ultimately Buy After Viewing This Item?

The Elements of Java Style
91% buy the item featured on this page:
The Elements of Java Style 4.2 out of 5 stars (33)
$14.39
Effective Java (2nd Edition) (Java Series)
3% buy
Effective Java (2nd Edition) (Java Series) 4.9 out of 5 stars (35)
$44.63
Head First Java, 2nd Edition
2% buy
Head First Java, 2nd Edition 4.4 out of 5 stars (241)
$29.67
Java Pocket Guide (Pocket Guides)
2% buy
Java Pocket Guide (Pocket Guides) 4.2 out of 5 stars (4)
$10.19

Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
Check the boxes next to the tags you consider relevant or enter your own tags in the field below.
(1)

Your tags: Add your first tag
 
Help others find this product — tag it for Amazon search
No one has tagged this product for Amazon search yet. Why not be the first to suggest a search for which it should appear?

 

Customer Reviews

33 Reviews
5 star:
 (18)
4 star:
 (8)
3 star:
 (3)
2 star:
 (2)
1 star:
 (2)
 
 
 
 
 
Average Customer Review
4.2 out of 5 stars (33 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

 
38 of 38 people found the following review helpful:
4.0 out of 5 stars A coding standard for every Java programmer., November 10, 2001
By Doug Bell "Java guru" (San Diego, CA USA) - See all my reviews
(REAL NAME)   
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".

35 Documentation Conventions: These very well-reasoned conventions will help to produce useful documentation as well as to eliminate unnecessary or excessively wordy documentation. The rules target both internal and external documentation as emphasize the different goals of each.

37 Programming Conventions: While there is a lot of good advice in this section, it also contains some of the weakest advice. Rule #74 on enumerations is flawed ("Effective Java" provides better coverage on how to use enumeration classes). The section on using assertions (4 rules) doesn't mention the important rule to only use tests with no side effects. It will also need to be modified for the assertion facility being added in J2SE 1.4. The section on threads and synchronization is the weakest (7 rules) as it contains rule #99 as well as some weak and incomplete advice in rules #97 and #98.

5 Packaging Conventions: This section contains some good advice not just on how to organize your classes into packages, but also on how to design stable packages.

Particularly on points of style and format, individuals will find aspects of any coding standard (at least any standard they didn't author) that they disagree with. Having written several coding standards in a variety of languages, I too have some rules I would have written differently. However, the benefit of a language-wide coding standard is that if everyone follows it, then everyone benefits from that shared agreement.

My company has adopted "The Elements of Java Style" as its coding standard with as few amendments as possible. You and your company should too.

Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
32 of 34 people found the following review helpful:
5.0 out of 5 stars An excellent guide to Java coding standards, November 30, 2000
By Zane Parks (Livermore, CA United States) - See all my reviews
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.

The sixth part is devoted to packaging conventions. Package naming conventions are covered in part three. An example from this part is "Maximize abstraction to maximize stability." That is, use "stable abstractions to create stable packages."

Consistently following standards such as those offered here will result in simpler, more understandable, more easily maintainable code, a worthy goal.

Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
11 of 11 people found the following review helpful:
5.0 out of 5 stars All the right elements, February 27, 2000
By "shawnlane" (Bristol, Bristol United Kingdom) - See all my reviews
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 Comment | Permalink | Was this review helpful to you? Yes No (Report this)


Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews

5.0 out of 5 stars Common Since is NOT Enough
As stated in the previous review this "pamphlet sized" book is invaluable to programs working in any sized group. Read more
Published 23 months ago by D. Seholm

4.0 out of 5 stars Useful short guide to formatting
Other reviews here that attack this book for not being a good design guide are missing the point. This book is a set of practices to make your code easier to read and work better... Read more
Published on January 13, 2007 by a_bucket_of_shoes

5.0 out of 5 stars I purchased a copy for every developer in the company
Clear, consise and short enough that developers will actually take the time to read, and filled with enough common sense that very few disagreements come from the developers about... Read more
Published on September 8, 2006 by Jenson J. Crawford

4.0 out of 5 stars Good code standard resource to start with
Several years have passed since this book was first published. Many things have changed in the Java world since then. Read more
Published on October 26, 2005 by Anton Kommar

2.0 out of 5 stars Not enough
I'm very disappointed at the amount content in this Book. Sun posted a Java style guide that was essentially the equivalent, but free. Read more
Published on July 29, 2004 by Won Lee

1.0 out of 5 stars Deserves 0 Stars
Read Code Complete by Steve McConnell. You don't need this book. It contradicts itself on several occasions and is totally wrong on others. Read more
Published on February 12, 2004 by Terry Smith

5.0 out of 5 stars Ideal for coders from students to experts
In the Spring semester of 2003, I am teaching a class in software engineering and the students are creating a large program that is to be written in Java. Read more
Published on March 24, 2003 by Charles Ashbacher

3.0 out of 5 stars Good start - Needs a 2nd edition
This book provides a strong basis for establishing the always needed coding standards on every project. Read more
Published on August 14, 2002 by Richard L. Robinson

4.0 out of 5 stars Big little book
Great quick reference when it doubt/can't remember. Personal coding style is a myth and is also a dangerous practice! Read more
Published on June 28, 2002 by Ed Pitoire

5.0 out of 5 stars A handy reference for producing expert code!
Hi there!
This booklet is a significant tool in achieving correct effective and easily maintainable code:

1. Read more

Published on April 19, 2002 by Eran Sharpe

Only search this product's reviews



Customer Discussions

 Beta (What's this?)
New! See all customer communities, and bookmark your communities to keep track of them.
This product's forum (0 discussions)
  Discussion Replies Latest Post
  No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
  [Cancel]


Active discussions in related forums
   


Product Information from the Amapedia Community

Beta (What's this?)



Look for Similar Items by Category


Perfect Programming

Shop for programmable thermostats

Install a programmable thermostat to help reduce heating costs by ensuring your home is heated optimally. Shop for name-brand thermostats, including Honeywell and Lux, in Home Improvement.

Shop all programmable thermostats

 

Big Savings in Books

Bargain Books
Find great titles at fantastic prices in our Bargain Books Store.
 

Buy Three Books, Get a Fourth Free

4-for-3 Books
Order any four eligible books under $10 and get the lowest-price book free in our 4-for-3 Books Store. See more details.
 

Measure Twice, Cut Once

Shop for Tape Measures
A tape measure offers the greatest flexibility for all types of measuring.

Shop all tape measures

 

 

Feedback

If you need help or have a question for Customer Service, contact us.
 Would you like to update product info or give feedback on images?
Is there any other feedback you would like to provide?

Your comments can help make our site better for everyone.


Where's My Stuff?

Shipping & Returns

Need Help?

Your Recent History

  (What's this?)
You have no recently viewed items or searches.

After viewing product detail pages or search results, look here to find an easy way to navigate back to pages you are interested in.

Look to the right column to find helpful suggestions for your shopping session.

Continue shopping: Top Sellers
Free
Free by Chris Anderson
Paranoia
Paranoia by Joseph Finder
My Soul to Lose
My Soul to Lose by Rachel Vincent
Glenn Beck's Common Sense

Conditions of Use | Privacy Notice © 1996-2009, Amazon.com, Inc. or its affiliates