Note
Safari Books Online (www.safaribooksonline.com) is an on-demand digital library that delivers expert content in both book and video form from the worlds leading authors in technology and business.
Technology professionals, software developers, web designers, and business and creative professionals use Safari Books Online as their primary resource for research, problem solving, learning, and certification training.
Safari Books Online offers a range of product mixes and pricing programs for organizations, government agencies, and individuals. Subscribers have access to thousands of books, training videos, and prepublication manuscripts in one fully searchable database from publishers like OReilly Media, Prentice Hall Professional, Addison-Wesley Professional, Microsoft Press, Sams, Que, Peachpit Press, Focal Press, Cisco Press, John Wiley & Sons, Syngress, Morgan Kaufmann, IBM Redbooks, Packt, Adobe Press, FT Press, Apress, Manning, New Riders, McGraw-Hill, Jones & Bartlett, Course Technology, and dozens more. For more information about Safari Books Online, please visit us online.
How to Contact Us
Please address comments and questions concerning this book to the publisher:
OReilly Media, Inc. |
1005 Gravenstein Highway North |
Sebastopol, CA 95472 |
800-998-9938 (in the United States or Canada) |
707-829-0515 (international or local) |
707-829-0104 (fax) |
We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at http://oreil.ly/Java7_Pkt.
To comment or ask technical questions about this book, send email to .
For more information about our books, courses, conferences, and news, see our website at http://www.oreilly.com.
Find us on Facebook: http://facebook.com/oreilly
Follow us on Twitter: http://twitter.com/oreillymedia
Watch us on YouTube: http://www.youtube.com/oreillymedia
Second Edition Acknowledgments
We extend a special thank you to our editor, Meghan Blanchette. Her oversight and collaboration has been invaluable in the endeavor. In this regard, we are very happy with the various improvements, errata updates, and Java SE 7 coverage that we have been able to include in this update.
Further appreciation goes out to our technical reviewers, Ryan Cuprak and Jonathan S. Weissman, as well as the various members of the OReilly team, our family, and our friends.
We would also like to thank again all of those who participated with the 1st Edition of the book.
Part I. Language
Chapter 1. Naming Conventions
Naming conventions are used to make Java programs more readable. It is important to use meaningful and unambiguous names comprised of Java letters.
Class Names
Class names should be nouns, as they represent things or objects. They should be mixed case (camel case) with only the first letter of each word capitalized, as in the following:
public
class
Fish
{...}
Interface Names
Interface names should be adjectives. They should end with able or ible whenever the interface provides a capability; otherwise, they should be nouns. Interface names follow the same capitalization convention as class names:
public
interface
Serializable
{...}
public
interface
SystemPanel
{...}
Method Names
Method names should contain a verb, as they are used to make an object take action. They should be mixed case, beginning with a lowercase letter, and the first letter of each subsequent word should be capitalized. Adjectives and nouns may be included in method names:
public
void
locate
()
{...}