You may complete CS 124 using either the Java or Kotlin programming language. Let’s discuss this choice and the tradeoffs involved.
Or, if you know what you’d prefer, go ahead and pick now!
We recommend choosing either Kotlin or Java as your primary programming language before beginning this online course. All materials and assessments will be available to complete in either language. We discuss the tradeoffs below.
Note that, while we ask that you make a choice as you start, you may change your mind at any point. You may also complete all of the exercises in both Kotlin and Java. So, even if you are already familiar with Java and choose it as your primary language, you may want to complete some of the Kotlin homework as a way to learn something new.
Kotlin is a younger language that Java, first appearing in 2011. Kotlin and Java are both built on top of some of the same underlying technologies, and Kotlin interoperates fully with existing Java code. However, the syntax of the two languages is completely different, and Kotlin provides better support for certain styles of programming that Java does. In May 2019, Google announced that Kotlin is now its preferred language for Android app development. So it’s here to stay.
Java is an older language that Kotlin, first appearing in 1996. Since then Java has become one of the most widely-used programming languages on Earth. Java was the first language chosen by Google for Android app development, and is still in widespread use for this purpose, even after Google announced in 2019 that Kotlin would replace Java as the preferred Android development language moving forward.
First and foremost: There is no wrong decision! Kotlin and Java are both established programming languages with solid industry backing and well-defined uses. Neither is going anywhere anytime soon.
In addition, learning computer science is only partly about learning how to program. This course will teach you to think like a computer scientist, and you can learn that equally well in Kotlin, Java, and any and every other programming language you learn next.
That said, we’re offering the course in two languages because there is a tradeoff. So let’s discuss some reasons that you might choose or not choose Kotlin or Java.
Whatever you choose, you will learn to program in this course!
Still confused about which to pick? Perhaps these questions will help.
Neither, which is why we offer both! Java and Kotlin are different languages that present different tradeoffs. Kotlin has arguably better syntax, but it’s newer and in less widespread use. Java is extremely well-established, but has begun to lose its dominant position—for example, as the primary language for Android, replaced by Kotlin.
There’s no right answer. But there’s also no wrong answer! Regardless of whether you choose Kotlin or Java, you will learn to program if you complete these materials. And if you start with Java/Kotlin, you’ll be able learn Kotlin/Java more easily once you’ve finished learning your first language.
Python has some significant weaknesses for teaching introductory computer science. Specifically, Python is dynamically typed, meaning that data types can change at runtime, which limits the types of mistakes that can be caught before your code is run. If the previous sentences didn’t make any sense yet, that’s OK. But trust that we’ve thought about this quite a bit and believe that both Java and Kotlin are better choices that Python for CS1. Feel free to ask on the forum if you’d like a longer explanation.
However, if you know a bit of Python and like it, you might want to consider choosing Kotlin. Kotlin’s syntax is a bit more similar to Python, at least when you are getting started, even if there are significant and important differences between the two languages lurking beneath the surface.
The Kotlin and Java versions of the course teach the same concepts and assign the same assessments. Neither version of the course is harder or easier than the other.
Ask us on the forum! We’re happy to talk through the decision with you.
If you already have some programming experience, you may find the following walkthroughs interesting. However, prior programming experience is not required to enroll or succeed in this course!
First, let’s look at some basic Java features.
Next we’ll look at a few of the differences and nice things about Kotlin.