1.8 Conventions in This Book


1.8 Conventions in This Book

New terms introduced in the main text throughout the book are printed in italics and phrases of particular importance are printed in bold.

The book includes a large amount of source code. Code examples are set in monofont and organized as follows:

 /** Source code beginning  */ public class anExample {} 

Modified or added code will additionally be highlighted in bold. References to code in the main text are set in monofont.

Most code examples are compatible with Java SDK 1.2-SDK 1.4. Where a special SDK version is required, this will be noted in the margin in addition to the text.

All code examples are based on the following guidelines to keep them short:

  • Import statements use the asterisk form where more than one class of a package is needed. This guideline is also useful for production code [Larman00].

  • The examples do not include comments, unless needed for better understanding. In particular, there are no JavaDoc comments.

  • The examples do not include package instructions, unless needed to avoid confusion.

These guidelines serve mainly to compress the printed code examples. In the real world, each team has to agree on the coding guidelines and observe them. Their consistent use is an important part of these guidelines.

Some readers may find the explicit use of "this" in messages to an object unusual. I use this convention because it emphasizes the semantic difference between sending messages and calling functions, namely, static methods.




Unit Testing in Java. How Tests Drive the Code
Unit Testing in Java: How Tests Drive the Code (The Morgan Kaufmann Series in Software Engineering and Programming)
ISBN: 1558608680
EAN: 2147483647
Year: 2003
Pages: 144
Authors: Johannes Link

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net