<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/semicolon-in-kotlin-y-n-programming-developer-androidstudio-kjgzrh8ph" -->

---
title: Semicolon in Kotlin? Y/N 🤔 #programming #developer...
description: Two specific cases in Kotlin where semicolons are required by the compiler: using a private setter on the same line as a property declaration, and defining...
canonical: https://daily.dev/posts/semicolon-in-kotlin-y-n-programming-developer-androidstudio-kjgzrh8ph
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Semicolon in Kotlin? Y/N 🤔 #programming #developer #androidstudio | daily.dev
og:description: Two specific cases in Kotlin where semicolons are required by the compiler: using a private setter on the same line as a property declaration, and defining...
og:url: https://daily.dev/posts/semicolon-in-kotlin-y-n-programming-developer-androidstudio-kjgzrh8ph
og:image: https://api.daily.dev/og/posts/KJGZRh8ph.png
og:image:alt: Semicolon in Kotlin? Y/N 🤔 #programming #developer #androidstudio
og:image:width: 1200
og:image:height: 630
og:locale: en
---

[Stevdza-San](https://daily.dev/sources/stevdzasan)

[Watch video](https://api.daily.dev/r/KJGZRh8ph)

# [Semicolon in Kotlin? Y/N 🤔 #programming #developer #androidstudio](https://api.daily.dev/r/KJGZRh8ph "Go to post")

This title could be clearer and more informative. Try out Clickbait Shield for free (5 uses left this month).

Two specific cases in Kotlin where semicolons are required by the compiler: using a private setter on the same line as a property declaration, and defining additional properties or functions inside an enum class after the constants list. Both cases are demonstrated with practical examples.

[#kotlin](/tags/kotlin "Check all #kotlin posts")[#android-development](/tags/android-development "Check all #android-development posts")

Mar 22 • 1m watch time

Comment

Bookmark

Copy

![Placeholder image for anonymous user](https://media.daily.dev/image/upload/s--qsFuKGv_--/t_logo,f_auto/public/noProfile)Share your thoughts Post

[![Stevdza-San's image](https://media.daily.dev/image/upload/s--IthzHSnd--/f_auto,q_auto/v1774179041/logos/stevdzasan?_a=BAMAMiWQ0)](https://daily.dev/sources/stevdzasan)

[Stevdza-San](https://daily.dev/sources/stevdzasan "https://daily.dev/sources/stevdzasan")

3 Followers

•

8 Upvotes

#### Would you recommend this post?

Copy link

Slack

WhatsApp

Facebook

X

New Squad

Copy linkShare with your friends

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Semicolon in Kotlin? Y/N 🤔 #programming #developer #androidstudio","url":"https://daily.dev/posts/semicolon-in-kotlin-y-n-programming-developer-androidstudio-kjgzrh8ph","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/semicolon-in-kotlin-y-n-programming-developer-androidstudio-kjgzrh8ph"},"datePublished":"2026-03-22T11:30:55.224Z","dateModified":"2026-03-22T11:34:02.486Z","description":"Two specific cases in Kotlin where semicolons are required by the compiler: using a private setter on the same line as a property declaration, and defining...","image":"https://i.ytimg.com/vi/NyRfDclAzPs/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/NyRfDclAzPs/sddefault.jpg","isAccessibleForFree":true,"articleSection":"Stevdza-San","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Stevdza-San","logo":"https://media.daily.dev/image/upload/s--IthzHSnd--/f_auto,q_auto/v1774179041/logos/stevdzasan?_a=BAMAMiWQ0","url":"https://daily.dev/sources/stevdzasan"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/semicolon-in-kotlin-y-n-programming-developer-androidstudio-kjgzrh8ph","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"kotlin,android-development","timeRequired":"PT1M","video":{"@type":"VideoObject","name":"Semicolon in Kotlin? Y/N 🤔 #programming #developer #androidstudio","description":"Two specific cases in Kotlin where semicolons are required by the compiler: using a private setter on the same line as a property declaration, and defining...","thumbnailUrl":"https://i.ytimg.com/vi/NyRfDclAzPs/sddefault.jpg","uploadDate":"2026-03-22T11:30:55.224Z","duration":"PT1M","url":"https://api.daily.dev/r/KJGZRh8ph","embedUrl":"https://www.youtube.com/embed/NyRfDclAzPs"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Stevdza-San","item":"https://daily.dev/sources/stevdzasan"},{"@type":"ListItem","position":3,"name":"Semicolon in Kotlin? Y/N 🤔 #programming #developer #androidstudio"}]}
```

