Kotlin or Java? Which is Best Programming Language for Android Developers?
Tags: android, java, kotlin
Published: 2018-09-24 12:42:44

---
title: Kotlin or Java? Which is Best Programming Language for Android Developers?
published: true
description: Given that Kotlin is now declared as the official language for Android app development, should new Android developers learn Kotlin or Java? I try to answer this frequently asked question with my experience in Java, Android, and Kotlin. 
tags: Android, Java, Kotlin
---
*Disclosure: This post includes affiliate links; I may receive compensation if you purchase products or services from the different links provided in this article.*

[![best Kotlin courses](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yrueb5bcqalap7tuzuv5.png)](https://click.linksynergy.com/deeplink?id=JVFxdTr9V80&mid=39197&murl=https%3A%2F%2Fwww.udemy.com%2Fcourse%2Fandroid-kotlin-developer%2F)


Ever since Google announced @Kotlin as the official language for Android development at Google IO in 2017, programmers who want to become Android developers are in a dilemma. 

The big question in front of them is whether they should learn [Kotlin](https://medium.com/javarevisited/top-5-courses-to-learn-kotlin-in-2020-dfc3fa7706d8) or [Java](https://medium.com/javarevisited/10-free-courses-to-learn-java-in-2019-22d1f33a3915).

If you are a complete beginner who wants to learn [Android development](http://javarevisited.blogspot.sg/2017/12/top-5-android-online-training-courses-for-Java-developers.html), then my answer is Java, but if you are a Java developer who wants to jump into the lucrative market of Android app development, then my answer is [Kotlin](https://medium.com/javarevisited/top-5-courses-to-learn-kotlin-in-2020-dfc3fa7706d8).

I’ll discuss why beginner Android programmers should start with Java and [why Java developers should learn Kotlin](http://javarevisited.blogspot.sg/2018/02/5-courses-to-learn-kotlin-programming-java-android.html#axzz56R4AatoQ) in this article.

When I say beginners should start with Java, you may be thinking, “What the heck? Kotlin is much more productive, less boilerplate code, and now the official language of [Android development](https://medium.com/hackernoon/top-5-courses-to-learn-android-for-java-programmers-667e03d995b4), and this guy is suggesting learning Java. I am not gonna fall for it…”

Well, being a Java developer, I may be a little bit biased, but I’ll try to explain the reasons why I suggest a beginner Android developer starting with Java rather than [Kotlin](https://medium.com/javarevisited/7-free-courses-to-learn-kotlin-in-2020-327c3872c1e1).

-----

## Kotlin or Java? Which is better for Android Developers?
The first and foremost thing is that Android development is not everything; as a programmer, you may be starting your career with Android development, but if you start with a well-established language like [Java](http://javarevisited.blogspot.sg/2013/04/10-reasons-to-learn-java-programming.html#axzz56lq0jrxn), you become a part of the bigger Java community and market, which directly means more job opportunities.

The second and more important thing is that there is a huge community of Java programmers, which means you can find answers when you are stuck.

This is very important because, as a beginner, you will face a lot of technical problems and you might not know where to head when you are stuck.

When you search Google with a Java problem, you are bound to get answers; the same cannot be said for [Kotlin](http://javarevisited.blogspot.sg/2018/02/top-3-jvm-languages-java-programmer-learn.html), which is still a new programming language.

There are also more tutorials, [books](https://javarevisited.blogspot.com/2017/06/top-5-java-and-android-game-programming-books.html), and [courses](https://medium.com/javarevisited/5-free-courses-to-become-an-android-developer-d4d207f53675) out there, both free and paid, which can teach you Android development with Java, like this list of [Android resources for Java programmers](http://javarevisited.blogspot.sg/2017/12/top-5-android-online-training-courses-for-Java-developers.html), but there are not many for Kotlin, especially free resources on Android development.

Things will definitely improve over time when more and more programmers start using Kotlin, but I doubt it can ever touch the popularity and adoption of the Java programming language.

> That’s why I suggest, a beginner programmer who wants to become an Android developer should start with Java, rather than Kotlin.

However, that’s not a hard and fast rule; if you prefer learning Kotlin rather than Java due to productivity reasons and are mostly focused on Android development, then you can sure start with Kotlin, and [Kotlin Fundamentals](https://pluralsight.pxf.io/c/1193463/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fkotlin-fundamentals) is a good place to begin.

<figure id="6d4d" class="graf graf--figure graf-after--p">

<div class="aspectRatioPlaceholder is-locked" style="max-width: 700px; max-height: 394px;">

<div class="progressiveMedia js-progressiveMedia graf-image is-canvasLoaded is-imageLoaded" data-image-id="1*aYSZ4eBDvWmG-La8SCY3kA.jpeg" data-width="1280" data-height="720" data-scroll="native">![](https://cdn-images-1.medium.com/max/1000/1*aYSZ4eBDvWmG-La8SCY3kA.jpeg)</div>

</div>

</figure>

But, once you know [Java](https://medium.com/javarevisited/top-5-java-online-courses-for-beginners-best-of-lot-1e1e240a758), your journey to Kotlin will also be easy and smooth because Kotlin is 100% interoperable with Java. It compiles into Java bytecode and runs on [JVM](http://javarevisited.blogspot.sg/2011/12/jre-jvm-jdk-jit-in-java-programming.html).

----


### Java Programmers Should Learn Kotlin

Now, coming back to the second set of programmers who wants to learn Android development: our fellow Java developers. For them, I think it's best to [learn Kotlin](https://www.java67.com/2020/05/5-free-courses-to-learn-kotlin-for-java-and-Android-developers.html) because it really improves productivity.

A class that takes 50 lines of code in Java can really be written in just one line in Kotlin. It can help you avoid all boilerplate code, like you don’t need to specify [getters and setters](http://javarevisited.blogspot.sg/2012/12/getter-and-setter-method-vs-public-modifier-field-java.html#axzz55oDxm8vv), [equals()](http://javarevisited.blogspot.sg/2012/12/difference-between-equals-method-and-equality-operator-java.html#axzz550uABzaC), [hashCode()](http://www.java67.com/2013/04/example-of-overriding-equals-hashcode-compareTo-java-method.html)or [toString()](http://javarevisited.blogspot.sg/2015/01/why-override-equals-hashcode-or-tostring-java.html#axzz55oDxm8vv) methods. Kotlin can generate all that by itself.

Here is a nice comparison between [Kotlin](https://kotlinlang.org/) and [Java](https://www.oracle.com/in/java/index.html) in terms of productivity and lines of code to write similar stuff:

<figure id="5a8a" class="graf graf--figure graf-after--p">

<div class="aspectRatioPlaceholder is-locked" style="max-width: 320px; max-height: 265px;">

<div class="progressiveMedia js-progressiveMedia graf-image is-canvasLoaded is-imageLoaded" data-image-id="0*8fg5ZmdAeuaPESm5.png" data-width="320" data-height="265" data-scroll="native">![](https://cdn-images-1.medium.com/max/1000/0*8fg5ZmdAeuaPESm5.png)</div>

</div>

</figure>

If you don’t know, Kotlin was developed by JetBrains, the company behind one of the most popular Java IDEs, IntelliJ IDEA. They were a Java shop and developing IDEs like [IntelliJ IDEA](https://medium.com/javarevisited/7-best-courses-to-learn-intellij-idea-for-beginners-and-experienced-java-programmers-2e9aa9bb0c05), PyCharm, and ReSharper, all in Java, and built Kotlin to improve their productivity, but at the same time, they cannot rewrite all their code in Kotlin, so that’s why they made Kotlin fully interoperable with Java.

Because Kotlin generates Java bytecode, you can use your favorite Java [frameworks](http://www.java67.com/2018/01/top-10-web-mobile-and-big-data-framework-libraries-technologies-programmers-should-learn-in-2018.html) and [libraries](http://javarevisited.blogspot.sg/2018/01/top-20-libraries-and-apis-for-java-programmers.html) in Kotlin and your Java friends can also use any Kotlin framework you develop.

Even a major Java framework like Spring has started supporting Kotlin from Spring 5\. If you don’t [what’s new in Spring 5](https://pluralsight.pxf.io/c/1193463/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fwhats-new-spring-5), check that out.

Even though currently, almost all @Android code, examples, and apps are in Java, it will change in the future because Google has declared Kotlin as the official language for Android app development.

Many companies have already started using Kotlin for their [Android app development](https://www.java67.com/2019/01/top-5-free-android-app-development-courses-for-programmers.html), and that’s the main reason I think Java developers should learn Kotlin.

If you decide to learn Kotlin Programming language, then [Kotlin for Android: Beginner to Advanced](https://click.linksynergy.com/fs-bin/click?id=JVFxdTr9V80&subid=0&offerid=562016.1&type=10&tmpid=14538&RD_PARM1=https%3A%2F%2Fwww.udemy.com%2Fdevslopes-android-kotlin%2F) is also a great place, to begin with. It’s a no-nonsense course for Java developers which will help you to get going with Kotlin in no time.

You don’t need to start with things like what a variable and object are, as this course has the right pace and depth for Java developers as compared to other beginner Kotlin courses for Android development.

If you prefer books, then [Kotlin in Action](https://www.amazon.com/Kotlin-Action-Dmitry-Jemerov/dp/1617293296?tag=javamysqlanta-20) is also not bad. You can learn about all the essential features of Kotlin, e.g. var vs val, data keyword, and functional programming all by yourself.

<figure id="cb12" class="graf graf--figure graf-after--p">

<div class="aspectRatioPlaceholder is-locked" style="max-width: 398px; max-height: 499px;">

<div class="progressiveMedia js-progressiveMedia graf-image is-canvasLoaded is-imageLoaded" data-image-id="1*QX9vdl1783G6eVJCw2MYUQ.jpeg" data-width="398" data-height="499" data-scroll="native">![](https://cdn-images-1.medium.com/max/1000/1*QX9vdl1783G6eVJCw2MYUQ.jpeg)</div>

</div>

</figure>

That’s all about **whether Android developers should learn Kotlin or Java**. As I said, if you are a complete beginner who wants to start your career as an Android developer, you’d better start with Java.

> You will not only get up to speed in no time, but you would have better community support, and knowledge of Java will help you a lot in the future. It will also help you to [learn Kotlin](https://medium.com/javarevisited/7-free-courses-to-learn-kotlin-in-2020-327c3872c1e1) in the future.

If you are a Java developer, then you’d better start learning Kotlin to not only improve your productivity but also help you become part of a lucrative niche of Java developers who know Kotlin, which may give you a competitive edge in the job market. It’s also one of the [**3 JVM languages Java developer should learn**](http://javarevisited.blogspot.sg/2018/02/top-3-jvm-languages-java-programmer-learn.html) on my list.

Other ** Programming Courses and Articles** you may like

-   [The Complete Java Developer RoadMap](https://javarevisited.blogspot.com/2019/10/the-java-developer-roadmap.html#123)
-   [5 Online Courses to learn Core Java for Free](http://javarevisited.blogspot.sg/2017/11/top-5-free-java-courses-for-beginners.html#axzz4zuIICRs9)
-   [5 Free Courses to Learn Data Structures and Algorithms](http://javarevisited.blogspot.sg/2018/01/top-5-free-data-structure-and-algorithm-courses-java--c-programmers.html#axzz55lOcYrUM)
-   [5 Online training courses to learn Angular for Free](http://www.java67.com/2018/01/top-5-free-angular-js-online-courses-for-web-developers.html)
-   [5 Courses to Learn Big Data and Apache Spark](http://javarevisited.blogspot.com/2017/12/top-5-courses-to-learn-big-data-and.html)
-   [7 Free courses to learn Database and SQL](https://medium.com/javarevisited/7-free-courses-to-learn-database-and-sql-for-programmers-and-data-scientist-e7ae19514ed2)
-   [5 Courses to learn Android for Java Developers](http://javarevisited.blogspot.sg/2017/12/top-5-android-online-training-courses-for-Java-developers.html)
-   [Top 5 Courses to become a full-stack Java Developer](https://javarevisited.blogspot.com/2020/04/top-5-courses-to-become-full-stack-java-developer-with-Angular-and-Reactjs.html)
-   [5 Free Courses to Learn Git and Github](http://javarevisited.blogspot.sg/2018/01/5-free-git-courses-for-programmers-to-learn-online.html#axzz568Oo1Jao)
-   [5 Free Spring  Framework Courses for Java Developers](http://www.java67.com/2017/11/top-5-free-core-spring-mvc-courses-learn-online.html)
-   [7 Free Books to learn Data Structure and Algorithms](https://medium.com/javarevisited/7-free-books-to-learn-data-structure-and-algorithms-in-java-346b2d70db10)
-   [10 Advanced Core Java Courses for Experienced Programmers](https://javarevisited.blogspot.com/2020/04/top-10-advanced-core-java-courses-for-experienced-developers.html)
-   [5 Node JS courses for Java and Web Developers](http://javarevisited.blogspot.sg/2018/01/top-5-nodejs-and-express-js-online-courses-for-web-developers.html)

Thanks for reading this article so far. If you liked it then, please share them with your friends and colleagues. If you have any questions or feedback, then please drop a note.

**P. S. -** If you want to learn a valuable skill like Kotlin, then I highly recommend you check out these [**best Kotlin courses from Udemy**](https://medium.com/javarevisited/top-5-courses-to-learn-kotlin-in-2020-dfc3fa7706d8?), which are both comprehensive and very engaging. You can use this course to learn Kotlin for server-side Java development and mobile app development with the Android platform.