...

Mobile App Development - Kotlin

Back to Course

Lesson Description


Lession - #388 Kotlin Keywords


How many keywords are there in Kotlin?

There are 29 modifier keywords in kotlin. These tokens act as keywords in modifier lists of declaration and can be utilized as identifiers in another contex.

List of kotlin keywords




Let's see an example





In above example "in" is a keyword.

Try it here

What is a Kotlin companion object? companion objects are singleton objects whose properties and functions are tied to a class but not to the instance of that class — basically like the “static” keyword in Java but with a twist.

What is kotlin kapt for?
Kapt is the Kotlin Annotation Processing Tool, and it's in pretty good shape these days. If you want to be able to reference generated code from Kotlin, you need to use kapt. To do that, simply include the plugin in your build.

What is Parcelize in kotlin?
Save. In Android, to pass the data from one activity to another activity, we use the Parcelable.

Kotlin Koans are a series of exercises to get you familiar with the Kotlin Syntax. Each exercise is created as a failing unit test and your job is to make it pass.

abstrac class
In Kotlin, abstract class is declared using the abstract keyword in front of class. An abstract class can not instantiated means we can not create object for the abstract class.

Abstract class declaration:

abstract class className {
    .........
} 


Online Kotlin Compiler - Tutorialspoint:

kotlin for forge;