You may complete CS 124 using either the Java or Kotlin programming language. Let’s discuss this choice and the tradeoffs involved.
You are required to choose either Kotlin or Java as your primary programming language before starting CS 124. 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 before starting, you may change your mind at any point. You may also complete all of the homework and the project 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.
However, once you begin a quiz in a language you must complete that quiz in that language, and will not receive credit for the same quiz taken in the other language. This is because the Kotlin and Java quizzes are similar, and seeing one would give you an advantage on the other.
We began offering Kotlin as a language option for CS 124 in Fall 2021, and several hundred students complete the course in Kotlin that semester. Students who completed the course in Kotlin did a bit better than those that chose Java, but this was probably due to more experienced students choosing Kotlin over Java.
Kotlin is a younger language than 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, which we will do a bit of later in the semester.
Java has been used by CS 124—and, previously CS 125—at Illinois for many years.
Java is an older language than 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. CS 124 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 CS 124 in two languages because there is a tradeoff here. 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 CS 124, and we’ll be there for you all the way!
Still confused about which to pick? Perhaps these questions will help.
Neither, which is why we’re offering 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 in CS 124. And if you start with Java/Kotlin, you’ll be able learn Kotlin/Java more easily once you’re ready.
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 CS 124 will teach the same concepts and assign the same assessments. Neither version of the course is harder or easier than the other. And, regardless of which language you pick, the CS 124 course staff will do everything they can to help you succeed.
Other than CS 124, no required CS courses at Illinois use either Java or Kotlin. CS 128, which immediately follows CS 124, starts and ends in C++, as does CS 225. CS 241 uses C, and a few of the 300-level required courses use Python. CS 421 seems to use either Haskell or OCaml, depending on who is teaching it.
There are a few upper-level software engineering courses that use Java, but by that point you’ll be so experienced that picking up a new language won’t be too much of a challenge.
Ask us on the forum! The choice of Kotlin or Java is new, and 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 CS 124! (In Spring 2021 the grade gap between students with and without prior experience was only 1 percentage point!)
First, let’s look at some basic Java features.
Next we’ll look at a few of the differences and nice things about Kotlin.