Conventions used
There are a number of text conventions used throughout this book.
Code in text
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “We begin with a class that implements Runnable
. actionCounter
is the number we will count down from in the thread.”
A block of code is set as follows:
private final double principal = 100.0; private final double annualInterestRate = 0.05; private final double compoundPerTimeUnit = 12.0; private final double time = 5.0;
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
private final NumberFormat currencyFormat; private final NumberFormat percentFormat;
Any command-line input or output is written as follows:
brew install openjdk@17
Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “When you click on Accept, the code from the JShell editor will be transferred to JShell.”
Tips or important notes
Appear like this.