KOTLIN ARTICLE

History of Kotlin

kotlin image
Developed by JetBrains

Kotlin was developed by JetBrains in 2010. They initially released it under the name Project Kotlin in July 2011. They needed a language that was concise, elegant, expressive, and also interoperable with Java, as most of their products were developed in Java, including the Intellij Idea.

Kotlin Introduction

What is Kotlin?

kotlin Syntax

Program entry point

        
          fun main() {
          println ("Hello world!")
         }
        
      

Print to the standard output

        
          print ("Hello ")
          print ("world!")
        
      

Variables

        
          val a: Int = 1  // immediate assignment
          val b = 2   // `Int` type is inferred
          val c: Int  // Type required when no initializer is provided
          c = 3       // deferred assignment
        
      
        
          var x = 5 // `Int` type is inferred
          x += 1
        
      
        
          val PI = 3.14
          var x = 0

          fun incrementX() {
          x += 1
         }