Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to Kotlin

Introduction to Kotlin

Presented on March 24 , 2018 at F22 Labs, Chennai

Avatar for Aravindraj Palani

Aravindraj Palani

March 24, 2018
Tweet

More Decks by Aravindraj Palani

Other Decks in Programming

Transcript

  1. • Kotlin’s development is from a team of JetBrains programmers

    based in Saint Petersburg, Russia. • Offers IDE for Java, Ruby, Python, PHP, SQL, Objective-C, C++, C# and JavaScript. • Flagship IDE IntelliJ IDEA . Android Studio built on IntelliJ IDEA . • In July 2011 JetBrains unveiled Project Kotlin • The name comes from Kotlin Island, near St. Petersburg. • At Google I/O 2017, Google announced first-class support for Kotlin on Android. • Kotlin v1.2 was released on November 28, 2017
  2. • Kotlin is fully compatible with JDK 6 . •

    Kotlin tooling is supported in Android Studio. • Compact runtime library. < 100K to size of APK. • Kotlin application runs as fast as equivalent Java one. • Getting started with Kotlin is very easy for a Java developer
  3. data Class Compiler derives following members ➔ equals() ➔ hashCode()

    ➔ toString() - like “Person(name=Aravindraj, age=25)” ➔ componentN() functions ➔ copy()
  4. Powerful when In above snippet case 3 is repeated twice

    . when matches its argument against all branches sequentially until some branch condition is satisfied. Once matching argument is found sequence terminates . Hence output will be Auto
  5. In the code snippent to left , first two cases

    evaluates to true . But since when is sequential output will be Warm