單項(xiàng)選擇題valstr="kotlin"with(str){println("length=${this.length}")}length長(zhǎng)度()

A.是5
B.是4
C.是3
D.是6


您可能感興趣的試卷

你可能感興趣的試題

1.單項(xiàng)選擇題修飾泛型函數(shù)正確的是()

A.funsingletonList(item:T):List{}
B.funsingletonList(item:T):List{/*……*/}
C.funsingletonList(item:):List{/*……*/}

2.單項(xiàng)選擇題成員函數(shù)以點(diǎn)表示法調(diào)用正確的是?()

A.類(lèi)名.方法名
B.類(lèi)名
C.方法名
D.方法名.類(lèi)名

3.單項(xiàng)選擇題下面那個(gè)是成員函數(shù)聲明正確的一個(gè)?()

A.ClassSample(){funfoo(){print("Foo")}}
B.ClassSample(){}
C.Funfoo(){print("Foo")}classSample(){}
D.Fun{print("Foo")}

4.單項(xiàng)選擇題在調(diào)用函數(shù)時(shí)使用命名的函數(shù)參數(shù)中正確的是()

A.fun reformat(str: String, normalizeCase: Boolean = true, upperCaseFirstLetter: Boolean = true, divideByCamelHumps: Boolean = false, wordSeparator: Char = ' ') {} 
B.fun reformat(str: String, normalizeCase: Int = true, upperCaseFirstLetter: Boolean = true, divideByCamelHumps: Boolean = false, wordSeparator: Char = ' ') {/*……*/}    
C.fun reformat(str: String, normalizeCase: Boolean = true, upperCaseFirstLetter: String = true, divideByCamelHumps: Boolean = false, wordSeparator: Char = ' ') {/*……*/}    
D.fun reformat(str: String, normalizeCase: Boolean = true, upperCaseFirstLetter: Boolean = true, divideByCamelHumps: String = false, wordSeparator: Char = ' ') {/*……*/}

5.單項(xiàng)選擇題調(diào)用成員函數(shù)使用點(diǎn)表示法()

A.Student().read()
B.Student().reader()
C.Student().writer()
D.Student().write()