Kotlin Basics of Kotlin

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Introduction

This topic covers the basics of Kotlin for beginners.

Remarks

  1. Kotlin file has an extension .kt.
  2. All classes in Kotlin have a common superclass Any, that is a default super for a class with no supertypes declared(similar to Object in Java).
  3. Variables can be declared as val(immutable- assign once) or var(mutables- value can be changed)
  4. Semicolon is not needed at end of statement.
  5. If a function does not return any useful value, its return type is Unit.It is also optional. 6.Referential equality is checked by the === operation. a === b evaluates to true if and only if a and b point to the same object.


Got any Kotlin Question?