Should I Start with Java or Kotlin as an Android Beginner?

This post may contain affiliate links that earn me a small commission at no additional cost to you. For more information read my Affiliate Disclosure.

7 min read

“If I want to learn Android development, should I start with Java or Kotlin?”

This question comes up in different communities quite a lot and I will try to clarify it here. To answer it, I’ve looked into different articles, posts, and opinions of different developers and tried to summarize what the general consensus is. This article is more of a reflection what the community thinks rather than my own opinion. I am not experienced enough to tell you if you should start with Java or Kotlin, but I can search for the answer. For this, I tried to filter for unbiased opinions. If someone tells you that Kotlin is the way to go while he is trying to sell you his new Kotlin book or course, it makes sense to keep that in the back of your head.

You’ve probably noticed that Kotlin gets pushed in the Android community quite a lot recently. First introduced in 2011, Kotlin is (compared to Java) a relatively new language. It is developed by the JetBrains team, the folks who also made IntelliJ IDEA (the IDE  on which Android Studio is based). In 2016, version 1.0 of Kotlin was released, and in 2017, at the Google I/O, it was introduced as an official first-class language for native Android development, which means that Google works closely together with JetBrains to fully support and improve the language, and you can use it in Android Studio right out of the box. Kotlin is not meant to replace Java on Android, but rather to coexist alongside of it, so you can do everything with Kotlin that you can do with Java and vice-versa. Google is not planning to drop Java.

However, a lot of developers see Kotlin as the future of Android programming, because it comes with a lot of improvements, like null-safety, more concise code and a ton of additional features and “syntactic sugar” that make writing, reading and maintaining code easier and less error-prone. If you want to see a full comparison between Kotlin and Java, click here.

At first, I wasn’t sure if Kotlin was just a fad and the people supporting it were just very noisy, that’s why I waited a while before I started learning it myself. And while there is definitely a certain level of hype involved, it doesn’t look like it’s going away anymore. The adoption of Kotlin is growing quickly, a lot of big apps like Pinterest and Trello use it already,  Google seems to prioritize it over Java now, and more and more documentation and code snippets written in Kotlin are popping up around the web. As you can see in the screenshot below, in some parts of the Android documentation, Kotlin is now the default tab for code examples, degrading Java to the alternative selection. According to this StackOverflow survey, Kotlin is the 2nd most loved language in 2018. So I think it’s pretty clear that we should not ignore it.

Android documentation with Kotlin as the default tab

If you already have experience with Java and you are able to read and understand Java code written by others, then it’s a good idea to start learning Kotlin and also write your future Android projects in Kotlin from the ground up. You will have a lot of fun and appreciate the more concise code and increased productivity. It’s very likely that Kotlin will be the primary programming language for Android in the future. More and more apps will be written in Kotlin, which means that a lot of Android jobs will require Kotlin skills.

Because it can compile to Java bytecode, Kotlin is 100% interoperable with Java, which means that you can gradually add pieces of Kotlin code to your existing Android Java projects, call Java methods from Kotlin, and still use all the Java libraries and Android APIs. And since the language is developed by JetBrains, it has first-class support in IntelliJ IDEA and Android Studio. You can use it without adding any plugins, and you get proper code-completion, syntax highlighting, debugging and refactoring tools, and other features, like a Java-to-Kotlin code converter that helps you get started.

However, while pretty much everyone agrees that Kotlin is the better language, most people (even big Kotlin fans) recommend to still start with Java as a beginner.

Why?

For one, there are much more Java tutorials out there than Kotlin tutorials and almost every solution for Android problems on pages like StackOverflow from the last years have been written in Java. Most of the documentation is in Java as well and if you start with Kotlin right away, this can make the learning process very difficult and confusing. Understanding the syntax of a language is one thing, but to actually build apps you have to learn how to use the different framework and library APIs. You have to learn what classes you have to use and which methods you have to call in the different phases of your app. And for this you need practice and a lot of examples you can refer to. Knowing the syntax of a language is actually secondary. And most Kotlin tutorials at the moment even compare Kotlin to Java occasionally to point out its advantages, which makes the learning process even more confusing. If you want to learn Android development right now, you can’t completely avoid Java. This might change over the next years, but we are not there yet. Also, while annoying for experienced developers, Java’s verbosity is what makes it so easy to read and understand. Kotlin solves a lot of Java’s pain-points and increases productivity by reducing boiler-plate code, but a lot of what Kotlin does makes more sense when you have some knowledge of how Java works.

Java is not going to be obsolete, even on Android. While I am writing this post, a discussion thread on Reddit appeared, asking the “Java or Kotlin for an Android beginner” question. The answer with the most upvotes comes from Zhuinden, who himself uses Kotlin extensively:

Java becomes even more important if you might decide to work in a field outside of Android later. Kotlin is not exclusive to Android or the JVM – it can also compile to JavaScript or native code, it can be used for server-side applications, web frontend, or pretty much everywhere else – but currently Android is it’s biggest (and loudest) market. In the enterprise world, Java is still the most important and widespread language and that is not going to change anytime soon. A lot of the existing code in big companies is written in Java. Getting a whole team to adopt a new language is challenging and rewriting working code usually not worth the investment. As a programmer, you spend most of the time fixing and extending already existing systems rather than writing completely new software from scratch, which is why there are disproportionately more job postings for Java than for Kotlin developers. I just ran a quick search on indeed.com and found 77,487 job postings for Java developers in the US, but only 1249 for Kotlin (and it was usually just listed as a nice-to-have skill, rather than the primary language).

The bottom line is: Even though Kotlin is the new big thing, it is reasonable to start with Java and then learn Kotlin later on. Java is still more widespread and it is hard to find a job with only Kotlin skills right now. Java is robust, battle-tested and easy to learn. Since Kotlin and Java are 100% interoperable, you can start implementing Kotlin into your existing Java projects when you feel ready and it won’t break anything. Once you have some experience with Java, learning Kotlin as an additional language will be pretty easy. It’s not like you have to start from scratch.

Just don’t get religious and stubborn about programming languages. As someone who has spent a lot of time learning Java himself, I am aware that it is important to stay open to new experiences. Learning new things is what makes programming so exciting. While all my video tutorials are in Java right now, I am going to start a Kotlin beginner tutorial on my Youtube channel soon, where we will learn the language together. I will release these lessons in small, bite-sized pieces, and I will keep making my other tutorials in Java for now. So you can keep learning Android development with Java as your primary language and still get a hold on Kotlin parallel to it when you feel ready.

What do you think about the Kotlin-vs-Java decision? Let me know in the comments below!

Related Post

6 thoughts on “Should I Start with Java or Kotlin as an Android Beginner?

  1. Thank you for your blog. I am a developer with many decades of experience and during that time I have tried to be flexible when choosing the language for any single project.

    Many times my client specifies the language, however, when given the free choice I try to choose the language best-suited to the project at hand. Part of that choice has to do with how easy finding example code and support is, for that reason alone I agree with your conclusion, master Java and add Kotlin skills along the way.

  2. Thank you for this lovely article.
    I am still behind with you Java tutorials, I want to do them ALL, but also very excited at the same time to learn Kotline side by side with you.
    I am very happy that I found you, Florian!

    • Thank you! My videos don’t really have an order in the way I created them, so it’s probably better to only watch the ones that you are actually interested in. But I am excited about the Kotlin tutorial!

  3. I’m new to programming, let alone Android development. I started last year with leaning the basics of Java and then moved onto learning Android development. Soon after that, Kotlin was announced as the official language which made me review my decision of learning Java but having invested some time already (and also having been able to understand the syntax quite well), I decided to move on with that and learn Kotlin if the need arises. However, during this one and year of my learning, I’ve come across numerous articles and posts recommending Kotlin over Java any hour of the day making me want to start learning Kotlin right away. Your post provided a sigh of relief as 1)
    it confirms that learning Java first is the better approach 2) it also suggests that Kotlin needs to be learned eventually and we shouldn’t ignore it 3) and finally, it informs about your upcoming Kotlin tutorials. So, thanks for that!

    I love ur short but effective tutorials….and also ur accent :). Will definitely start ur Kotlin tutorials but first in line are the recent ones on Android Architecture Components.
    Thanks for the post and keep up the good work.

    Some suggestions:
    Kindly provide a forum sort of space here, for budding developers to discuss things directly with u and each other.
    Also pl provide tutorials on app development areas which are necessary for almost every app and haven’t been touched by most of the YouTubers. For example, tutorials on menetizing an app using various sorts of ads, in app purchases of products and subscriptions, designing introductory screens for the app, user authentication, backups, cloud sharing, advanced recyclerview with sectioned and sticky headers, expandable lists, implementation of search filters in recyclerview etc. The stuff that’s available on these areas is either outdated or poor.
    Thanks
    Shahood

    • Thank you! I am happy that the post could clarify some things.
      I thought about making a forum, but we already have a Facebook group here:
      https://www.facebook.com/groups/1543003582456417/

      I think Facebook is better because it’s easier to find and most people have a FB account anyways.

      Yea I want to make tutorials on a lot of those topics, but since I learn this stuff myself along the way, I can’t release videos so frequently.
      But in the future I will try to cover as much as I can.

Leave a Comment

This form collects your name, email and ip address so that we can keep track of the comments placed on the website. For more information on where, how and why we store your data, check our Privacy Policy.