# Empty Main function

**URL:** <https://discuss.kotlinlang.org/t/empty-main-function/30864>\
**Category:** Uncategorized\
**Created:** [November 26, 2025, 12:03am UTC](https://discuss.kotlinlang.org/t/empty-main-function/30864 "2025-11-26T00:03:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcs.79c](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@dcs.79c](https://discuss.kotlinlang.org/u/dcs.79c)\
**Post date:** [November 26, 2025, 12:03am UTC](https://discuss.kotlinlang.org/t/empty-main-function/30864/1 "2025-11-26T00:03:03Z")

</div>

I read online that the Main function is the starting point of the program.

Is it possible to start a Kotlin program with an empty Main function, that is, fun Main(), & nothing else?

I’m intrigued about Kotlin & I’m eager to start learning it. I’ve already installed IntelliJ on my Mac.

---

<div class="post-metadata">

**Author:** ![Skater901](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/skater901/32/10163_2.png) [@Skater901](https://discuss.kotlinlang.org/u/Skater901)\
**Post date:** [November 26, 2025, 10:43am UTC](https://discuss.kotlinlang.org/t/empty-main-function/30864/2 "2025-11-26T10:43:09Z")

</div>

Yep, perfectly valid. I just tested it to be sure.

```auto
fun main() {
}

```

---

<div class="post-metadata">

**Author:** ![dcs.79c](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@dcs.79c](https://discuss.kotlinlang.org/u/dcs.79c)\
**Post date:** [November 28, 2025, 4:07am UTC](https://discuss.kotlinlang.org/t/empty-main-function/30864/3 "2025-11-28T04:07:28Z")

</div>

YAY! Thank you.

I assumed that it is possible to have an empty Main function & it is!

I guess that sometimes it is necessary to have code in the Main function, but I’m glad that It is possible to have an empty main function. The Main function is the starting point of the program

I’ve tried different programming languages. I tried BASIC before it became Visual Basic. I tried Visual BASIC. I tried Turbo Pascal. I even tried Java. Java is so verbose! It reminds me of COBOL.

I researched JVM languages. I want a language that is 100% interoperable with Java. There aren’t too many. Scala has a steep learning curve & strange syntax. Boxlang is 100% interoperable with Java. I haven’t found much information on Boxlang. Kotlin fits the bill. It checks all of the boxes. I have a Mac. I installed IntelliJ on it. I have a book on programming in Kotlin. I’m learning Kotlin!
