DEV Community

Discussion on: Why use Kotlin for Android development? Kotlin benefits, features, versions

Collapse
 
pawarpayal005 profile image
Payal Pawar • Edited

Which is better programming language (Java or Kotlin) to use in Android Development and how to use it? Please guide me.

Collapse
 
dianamaltseva8 profile image
Diana Maltseva • Edited

Hi.) Kotlin is much simpler and allows writing more concise code. Provides features missed in Java, while it is fully compatible with it. Java is more popular as it exists for decades and it is really great. Many companies are using Java, so you might need it to work on some projects.

Here is a list of sources that will help you learn Kotlin:

Kotlin on Android:

  1. Get Started with Kotlin on Android: A short guide to start using Kotlin in Android Studio.
  2. Kotlin-Java Interop Guide: A set of rules for authoring public APIs interoperable in Java and Kotlin.
  3. Kotlin Style Guide: Google’s Android coding standards for source code in the Kotlin Programming Language.

Samples

  1. Sunflower: An end-to-end sample app that illustrates Android development best practices with Kotlin and Jetpack.
  2. Kotlin samples: A collection of Android code samples written in Kotlin.
  3. Converting your iOS App to Android Using Kotlin

Other

  1. Tutorials
  2. Kotlin on StackOverflow

Hope, I've helped you!)

Collapse
 
savnisharma1 profile image
savnisharma

If you are starting with Android, definitely go with Java as you will be able to find much more information about Android development in Java which will be extremely important in the starting phase.

Later, you can switch to Kotlin or stay with Java as per your preference.

Kotlin is just another language for JVM (Java Virtual Machine) and knowing Java will help you to grasp Kotlin faster as a lot of information is available in form of comparation between Kotlin and Java.

As you will become skilled in both languages, you can find solution in Kotlin or Java and you will be easily able to transform it to the language you are actually using.

And do not worry about Google replacing Java. Kotlin is just a language and needs Java VM to work and the heart of Android is defacto Java VM, so Kotlin is not a new language for Android - it’s just an another option how to write code that will be then compiled to Java byte code, so both Java and Kotlin will co-exists together. For Kotlin, this kind of co-existence is extremely important because Java’s ecosystem is mature, stable and provides way more libraries than is available for any other language. And this gives Kotlin a huge advantage over new programming languages written from scratch.

Spring Framework Online Course