- Kotlin Programming By Example
- Iyanu Adelekan
- 64字
- 2021-08-27 20:00:09
The function naming convention
The conventions for naming functions in Kotlin are similar to that of Java. When naming methods, camel case is utilized. In camel case, names are written such that each word in the name begins with a capital letter, with no intervening spaces or punctuation:
//Good function name
fun sayHello() {
println("Hello")
}
//Bad function name
fun say_hello() {
println("Hello")
}
推薦閱讀
- Flask Blueprints
- Production Ready OpenStack:Recipes for Successful Environments
- 數(shù)據(jù)結(jié)構(gòu)(Python語(yǔ)言描述)(第2版)
- 可解釋機(jī)器學(xué)習(xí):模型、方法與實(shí)踐
- 數(shù)據(jù)結(jié)構(gòu)習(xí)題解析與實(shí)驗(yàn)指導(dǎo)
- Service Mesh實(shí)戰(zhàn):基于Linkerd和Kubernetes的微服務(wù)實(shí)踐
- Mastering Python Design Patterns
- Lift Application Development Cookbook
- Django Design Patterns and Best Practices
- MySQL 8從零開(kāi)始學(xué)(視頻教學(xué)版)
- Visual Basic語(yǔ)言程序設(shè)計(jì)基礎(chǔ)(第3版)
- 數(shù)字媒體技術(shù)概論
- Professional JavaScript
- Less Web Development Cookbook
- Learning jqPlot