In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: "We name our interface TimeService.java, which contains a single method definition getTime() ."
A block of code will be set as follows:
@Stateless
public class TimeServiceBean implements TimeService {
public String getTime() {
Formatter fmt = new Formatter();
Calendar cal = Calendar.getInstance();
fmt.format("%tr", cal);
return fmt.toString();
}
}
When we wish to draw your attention to a particular part of a code block, the relevant lines or items will be made bold:
@Stateless
public class TimeServiceBean implements TimeService {
private @EJB NiceDayService niceDay;
public String getTime() {
Formatter fmt = new Formatter();
Calendar cal = Calendar.getInstance();
fmt.format("%tr", cal);
return fmt.toString() +
niceDay.getMessage();
}
}
Any command-line input and output is written as follows:
New terms and important words are introduced in a bold-type font. Words that you see on the screen, in menus or dialog boxes for example, appear in our text like this: " Under the Web Services heading in the Common Tasks pane on the left of the screen, click on Arithmetic ."