Kotlin Naming Conventions: Official Style Guide Summary

4 min read

Kotlin follows conventions similar to Java, with some Kotlin-specific additions.

Convention Table

ItemConventionExample
PropertiescamelCaseuserName
FunctionscamelCasegetUserById()
ClassesPascalCaseUserAccount
Objects/SingletonsPascalCaseDatabaseConfig
Constants (top-level)SCREAMING_SNAKEMAX_COUNT
Packageslowercase, dotscom.example.app
Backing properties_ prefix_items

Convert

camelCase, PascalCase. Hub.