How to Install Kotlin Programming Language in Ubuntu/Debian Linux

How to Install Kotlin Programming Language in Ubuntu/Debian Linux - Hello guys, Have you heard about Kotlin? Kotlin is a programming language that can be called the new programming language. Until now Kotlin has reached the 1.0 release. Developers claim Kotlin as a pragmatic programming language.
Kotlin is a pragmatic programming language for JVM and Android that combines Object Oriented (OO) and functional features and focuses on interoperability, security, clarity and integration support with major tools. As a general-purpose programming language, Kotlin can run wherever Java is. Kotlin can be used to develop various server-side applications, mobile apps (Android), desktop applications. What are the major support tools for Kotlin? This is it.

How to Install Kotlin Programming Language in Ubuntu/Debian Linux

How to Install Kotlin Programming Language in Ubuntu/Debian Linux

Install Kotlin using The Software Development Kit (SDK) Manager !

FF(Featured Features) of Kotlin Programming Language:

This relatively new programming language prioritizes productivity, therefore Kotlin comes with features that make it easy to program code generation. Here are the sweet features:
  • Safe from Null, as mentioned above, no longer need to worry about the possibility of Null Pointer Exception. The compiler will systematically mark a potentially null pointer.
  • Functional Programming, lambda support and mapping capabilities, folding, in Collection Java.
  • Automatic Data Annotation is created to reduce boilerplate; such as equals, hashCode, toString.
  • Slim Syntax, which offers quick syntax writing. Create one-liner function, create Java Beans with just one line, setter method and automatic getter.
  • Extension Function that allows to add methods to a class without having to change its source code.
  • String interpolation that allows to insert variables into Strings without connection as in EcmaScript.
  • There are many more, naming arguments, optional parameters, default values ​​for parameters.
Command Installation:
$ wget -O sdk.install.sh "https://get.sdkman.io"

$ bash sdk.install.sh
How to Install Kotlin Programming Language in Ubuntu/Debian Linux
  • Wait the installation process, and after that.  type this command.
$ source ~/.sdkman/bin/sdkman-init.sh
  • after that, test your sdk by type this command.
$ sdk help
  • to install kotlin just type.
$ sdk install kotlin
  • after the installation process kotlin have done, next you should install openjdk.
$ sudo apt-get install openjdk-8-jre-headless
Create Your First Kotlin Program !
fun main(args: Array<String>) {

      println("Hello World!");

}
  • and then save the file with .kt extension e.g here I would save my file as "hello.kt".
  • after you save this, you should compile your kotlin program into jar.
$ kotlinc hello.kt -include-runtime -d hello.jar
  • run your first kotlin program.
$ java -jar hello.jar
  • the result will:
Hello World!
What do you get in this article? I hope this article titled How to Install Kotlin Programming Language in Ubuntu/Debian Linux will help you, and don't forget to share this article guys. Don't forget to continue to visit this blog, if you feel confused with this tutorial, comment on this article, and ask which part you feel confused.
Maybe you want to read our other article: What's Debian?