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

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.
主站蜘蛛池模板: 宁津县| 寿宁县| 莒南县| 昆山市| 金寨县| 石林| 高唐县| 西盟| 信宜市| 建湖县| 宁强县| 灵璧县| 太和县| 崇信县| 南汇区| 富民县| 建湖县| 诸城市| 博乐市| 徐汇区| 沅陵县| 循化| 封开县| 大石桥市| 治县。| 平罗县| 临夏市| 桂林市| 陆良县| 兴文县| 东乡族自治县| 睢宁县| 瓦房店市| 龙江县| 绥滨县| 大兴区| 安西县| 比如县| 泸定县| 宁明县| 博爱县|