Kotlin Naming Conventions: Official Style Guide Summary
4 min read
Kotlin follows conventions similar to Java, with some Kotlin-specific additions.
Convention Table
| Item | Convention | Example |
|---|---|---|
| Properties | camelCase | userName |
| Functions | camelCase | getUserById() |
| Classes | PascalCase | UserAccount |
| Objects/Singletons | PascalCase | DatabaseConfig |
| Constants (top-level) | SCREAMING_SNAKE | MAX_COUNT |
| Packages | lowercase, dots | com.example.app |
| Backing properties | _ prefix | _items |