Kotlinlearncs.online LogoJava

    Choose Your Language

    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!

    Language Option
    Language Option

    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
    Kotlin

    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
    Java

    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.

    How to Choose
    How to Choose

    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.

    You Might Choose Kotlin Because…
    You Might Choose Kotlin Because…

    1. Kotlin is a newer language that addresses many recognized weaknesses with Java and reflects several additional decades of improvement in programming language design
    2. Knowing Kotlin will help you stand out when looking for internships and jobs, since it’s a newer language with a smaller developer community
    3. You already know a bit of Java from a previous course and would like to challenge yourself with something new

    You Might Choose Java Because…
    You Might Choose Java Because…

    1. Java is one of the most widely-used programming languages, and there is a lot existing code already written in Java
    2. Many employers already interview in Java, while fewer have yet added Kotlin
    3. You already know a bit of Java from a previous course and would like to build on your current understanding

    Ready to Pick?
    Ready to Pick?

    Whatever you choose, you will learn to program in this course!

    Frequently Asked Questions
    Frequently Asked Questions

    Still confused about which to pick? Perhaps these questions will help.

    Which is better, Kotlin or Java?
    Which is better, Kotlin or Java?

    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.

    Why isn’t Python an option?
    Why isn’t Python an option?

    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.

    Will I do better if I choose Kotlin or Java?
    Will I do better if I choose Kotlin or Java?

    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.

    (Insert your question here…)?
    (Insert your question here…)?

    Ask us on the forum! We’re happy to talk through the decision with you.

    Language Feature Comparison
    Language Feature Comparison

    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!

    Java Features
    Java Features

    First, let’s look at some basic Java features.

    System.out.println("Hello, Java!");

    Kotlin Features
    Kotlin Features

    Next we’ll look at a few of the differences and nice things about Kotlin.

    println("Hello, Kotlin!")