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 namefun sayHello() {  println("Hello")}//Bad function namefun say_hello() {  println("Hello")}

Get Kotlin Programming By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.