Follow a canonical form

Canonical form is a practice that conforms to established principles learned only through practice, apprenticeship, and interaction with experts. This means when creating a class for general-purpose use, you must include definitions for "equals( )," "hashCode( )," "toString( )," "clone( )" and (implement "Cloneable"). Then implement "Comparable" and "Serializable."



Previous: #4 - Don't create your own "decorated" private data member names
 
Next: #6 - Use "get," "set", and "is"


Follow the Sun coding conventions Use "get," "set," and "is"
Standardize! Make iterative testing of classes easy
Follow standard capitalization rules Avoid inheritance
Don't create your own "decorated" private data member names Don't overuse finalization
Follow a canonical form Use nested classes


Java Zone - Get Help - Search Tips

 

Eckel's Ten Java Maxims for Good Design
DevX's Review of Eckel's "Thinking in Java"
"Thinking in Java, Second Edition" DevX product listing
Eckel's Home Page
Java Code Library
Java Pro Magazine
Java Discussion Group

 TALK BACK
Is a set of standard coding rules enforceable in a medium or large organization? Does your team and/or company have a standardized Java coding scheme? Join the discussion and tell our growing Java development community about it.
Click here to Join


Save on Hot Java Specials
SOFTWARE:
dtSearch Web
Add power searching to your web site.
Buy Now!
BOOKS:
PointBase Mobile Edition
Enable local data access for mobile users.
Buy Now!
Advertising Info  |   Member Services  |   Contact Us  |   Help  |   Feedback  |   Site Map
Jupiterweb networks

internet.comearthweb.comDevx.comClickZ

Search Jupiterweb:

Jupitermedia Corporation has four divisions:
JupiterWeb, JupiterResearch, JupiterEvents, and JupiterImages

Copyright 2004 Jupitermedia Corporation All Rights Reserved.
Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Jupitermedia Corporate Info | Newsletters | Tech Jobs | E-mail Offers