Better Programming

Advice for programmers.

Follow publication

Member-only story

If Kotlin Runs on the JVM Just Like Java, Then How Does It Provide So Many Great Features?

Simon Wirtz
Better Programming
Published in
6 min readSep 27, 2022
Arm supporting a tree

Looking at the very fundamentals; what exactly do we mean when we refer to a JVM languageand how does the Kotlin language relate to that? Wasn’t only Java meant to run on the JVM? In this article, I want to talk about the basics of what the JVM is and how it all plays together. Especially, I will demonstrate how other languages than Java can be executed on the JVM. To do so, we will learn what the JVM bytecode is and how it makes JVM languages possible.

The Kotlin programming language provides many features that aren’t available in Java such as proper function types, extension functions, or the built-in singleton support via the object declaration. How can Kotlin provide more features than the language that is meant to run on the JVM in the first place? I’ve taken a deeper look at how Kotlin works under the hood and what JVM language actually means. We’ll be having a look at Kotlin’s bytecode generation. If you also thought about these things before, this article should bring some light into the darkness 🙂

The Java Virtual Machine

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Simon Wirtz
Simon Wirtz

Written by Simon Wirtz

🌍 🧑‍💻 I am a Freelance Software Engineer and Expert for Kotlin and Java. I write about code, software engineering, interviewing, traveling, and more 🔥

Write a response