官术网_书友最值得收藏!

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: 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 introduced a new BakeryGood class, with the shared behavior and state of both Cupcake and Biscuit classes and we made both classes extend BakeryGood."

A block of code is set as follows:

open class BakeryGood(val flavour: String) { 
fun eat(): String {
return "nom, nom, nom... delicious $flavour bakery good"
}
}

class Cupcake(flavour: String): BakeryGood(flavour)
class Biscuit(flavour: String): BakeryGood(flavour)

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

fun main(args: Array<String>) { 
    val emptyList1 = listOf<Any>()
val emptyList2 = emptyList<Any>() println("emptyList1.size = ${emptyList1.size}") println("emptyList2.size = ${emptyList2.size}") }

Any command-line input or output is written as follows:

$ kotlin HelloKt

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "A dialog will appear that will ask whether you want to open it as a file or as a project. Click on Open As Project"

Warnings or important notes appear like this.
Tips and tricks appear like this.
主站蜘蛛池模板: 烟台市| 开化县| 咸丰县| 尼勒克县| 西畴县| 宜都市| 新河县| 新安县| 乌拉特中旗| 外汇| 苍南县| 宜章县| 秦安县| 元氏县| 遂宁市| 山阳县| 根河市| 龙南县| 巫溪县| 文昌市| 贡山| 兴义市| 城步| 孙吴县| 衡南县| 浦北县| 涪陵区| 成都市| 吉木萨尔县| 思南县| 教育| 阿鲁科尔沁旗| 临汾市| 涞水县| 阳东县| 松阳县| 商都县| 盈江县| 资兴市| 临汾市| 郸城县|