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: “ So, the main()
method has now handed over control to the simpleExample()
method, and control will not return to main()
until simpleExample()
exits”
A block of code is set as follows:
public class HelloWorld { public static void main(String[] args) { System.out.println("Hello world!"); } }
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
// int age = 25; System.out.println(age);
Any command-line input or output is written as follows:
Enter a number (negative number to exit) -->1 Enter a number (negative number to exit) --> 2
Tips or important notes
Appear like this.