According to the official statistics revealed in 2019, the quantity of Android mobile apps downloads is increasing dramatically, with 75.7b downloads in 2018 compared to 67b in 2017, and 57.8 in 2016. The demand for Android development is uprising accordingly as well, and that, in its turn, provokes the popularity growth of the two major Android mobile application development languages, namely Java and Kotlin.

According to the official statistics revealed in 2019, the quantity of Android mobile apps downloads is increasing dramatically, with 75.7b downloads in 2018 compared to 67b in 2017, and 57.8 in 2016. The demand for Android development is uprising accordingly as well, and that, in its turn, provokes the popularity growth of the two major Android mobile application development languages, namely Java and Kotlin.

Let’s dive a bit into some theoretical and historical stuff. Java as a language has been around ever since 1991. Java has been in use for more than 20 years and still hits top 5 of the most demanded programming languages even today, so it’s not a “legacy” language – software engineers all around the world use Java to create solutions that correspond to the modern world requirements, from big corporate information systems to specific Android mobile application development solutions. In a nutshell, one could say that Java is the leading enterprise choice, a standard. And moreover, it is the first official Android programming language approved by Google. So no wonder, that any self-respecting outsource mobile app development company has Java in its technology stack.

And what about Kotlin? It appeared in 2016, but already in 2017 Google gave an announcement that Kotlin is the second official Android development language. And the most recent news – in may 2019 Google declared Kotlin as their first official Android development language. Kotlin is a programming language for JVM (Java Virtual Machine) and JavaScript. Generally speaking, Kotlin appeared as a result of the huge need of increased productivity that Java lacks and the necessity to cut down on so-called “boilerplate code” that Java exceeds in. An interesting fact from the statistics – the number of Kotlin developer vacancies has increased by 740% in 2018 compared to 2017 – isn’t that crazy? 7 times more popular, in just one year after the announcement.

Many IT experts predict that the major percentage of android mobile application development processes will be delegated to Kotlin in the nearest future, just like it happened with iOS when Swift had been released and put Objective C aside.

However, let’s look closer at both of these programming languages and try to make our own conclusions based on objective pros and cons of each of them. Can Kotlin replace Java indeed? Or maybe there is another end to this story? Let’s find out.

Brevity is the soul of wit 

Let’s look at the code examples of the good old “Hello world” in Java and Kotlin.

Big difference, right? And this is just a simple example. There are cases when you need only one line in Kotlin for something that takes 20 lines in Java. In our practice one project has been re-written from Java to Kotlin, and SLOC (Source lines of code) has reduced from 23K to 10K, without losing even a slight part of functionality. Kotlin has the so-called “extensions” that let make the code a few times shorter. In this case – Kotlin wins.

Errors

There is a research that proves the existence of correlation between the number of source code lines and the quantity of errors in it. Steve McConnell said that each 1000 code lines contain up to 50 errors. Thus, thanks to Kotlin’s succinctness, the percentage of potential errors decreases as well. One more plus for choosing Kotlin as the best tool for mobile app development.

Productivity

This time Kotlin also wins, since it has an intuitive syntax which ensures higher productivity and effectiveness. Your software team will be able to create an application within a shorter time compared to Java also due to faster deployment processes and less lines of code.

Community

As we have mentioned before, Google has named Kotlin as the first language for Android software development. As a result, new versions of all the official libraries, primarily JetPack (which is the core pack of libraries for Android development) will be developed Kotlin-first. Of course Java will still be there for Android, Google didn’t forget about it, just all the updates for Java will be released slightly later.

However, Java has a bigger community (obviously, because Java has existed for much longer), and thus for newbies, Java will be a better choice. Starting with Java will be easier, because if you bump into some obstacles while learning, there is a bigger probability that you will find help in, for example, Stack Overflow’s Java enthusiasts community.

So, in this case we give Kotlin a plus for the future and for giving it a try as a second language to learn, and Java is getting a plus for a bigger community and for being a better choice for the newcomers in the software development world.

Smartym Pro – a software development company, participates actively in both Java and Kotlin communities.

Interoperability

A major part of Kotlin’s solutions are interoperable with Java and vice versa (in most cases, but not all). Here we can talk about a symbiosis, i.e. joint use of both languages in one project. So that the two of them complemented each other.

Tools and feature-richness

No doubt that Java, due to its pretty long history, is a lot more feature-rich, while Kotlin, being a young technology in Android mobile app development industry, lacks some important tools and the stability of the existing Kotlin tools.

Conclusion

As a conclusion to this article, we would like to admit that Kotlin will surely become more and more popular now that Google placed it on the main stage for Android development. Kotlin is already used in such popular products as: Pinterest, Evernote, Corda, Coursera, Uber, Trello, Kickstarter, Gradle and many others. Developers all over the world choose to transfer at least a part of their source code to Kotlin for better app maintainability, less crash probability and faster development time. However, nothing can replace the good old Java due to its big community, feature-richness and easy of study for junior developers, and this is also why we cherish Kotlin’s interoperability with Java’s components.

And if you are in search for a team that has great expertise in both Java and Kotlin and is able to create a unique Android mobile app using the advantages of both technologies – don’t hesitate to write us a letter. Smartym Pro provides not only full-cycle development, but also free consultation on your project and can transfer your existing Java code to Kotlin or vice versa. Just write us and let’s create a future-proof project together!