Conventions
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, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Then, it calls the square
method to compute the value for the local variable s
."
A block of code is shown as follows:
object SquareOf5 extends App { def square(x: Int): Int = x * x val s = square(5) println(s"Result: $s") }
Any command-line input or output is written as follows:
run-main-46: ... Thread-80: New thread running. run-main-46: ... run-main-46: New thread joined.
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "After clicking on the Thread Dump button, Java VisualVM displays the stack traces of all the threads, as shown in the following screenshot:".
Note
Warnings or important notes appear in a box like this.
Tip
Tips and tricks appear like this.