Kotlin Programming

Kotlin Programming

Kotlin is a new open source programming language like Java, JavaScript, etc. It is a high level strongly statically typed language that combines functional and technical part in a same place. Currently, Kotlin targets Java and JavaScript. It runs on JVM.

Kotlin is a programming language introduced by JetBrains, the official designer of the most intelligent Java IDE, named Intellij IDEA. This is a strongly statically typed language that runs on JVM. In 2017, Google announced Kotlin is an official language for android development. Kotlin is an open source programming language that combines object-oriented programming and functional features into a unique platform. The content is divided into various chapters that contain related topics with simple and useful examples.

Advantages and Disadvantages

Following are some of the advantages of using Kotlin for your application development.

Easy Language − Kotlin is a functional language and very easy to learn. The syntax is pretty much similar to Java, hence it is very easy to remember. Kotlin is more expressive, which makes your code more readable and understandable.

Concise − Kotlin is based on JVM and it is a functional language. Thus, it reduce lots of boiler plate code used in other programming languages.

Runtime and Performance − Better performance and small runtime.

Interoperability − Kotlin is mature enough to build an interoperable application in a less complex manner.

Brand New − Kotlin is a brand new language that gives developers a fresh start. It is not a replacement of Java, though it is developed over JVM. It is accepted as the first official language of android development. Kotlin can be defined as - Kotlin = JAVA + extra updated new features.

Following are some of the disadvantages of Kotlin.

Namespace declaration − Kotlin allows developers to declare the functions at the top level. However, whenever the same function is declared in many places of your application, then it is hard to understand which function is being called.

No Static Declaration − Kotlin does not have usual static handling modifier like Java, which can cause some problem to the conventional Java developer.

This syllabus has been prepared for the beginners to help them understand the basics of Kotlin programming language. After completing this course, you will find yourself at a moderate level of expertise in Kotlin, from where you can take yourself to the next levels.

Before proceeding with this tutorial you should have a basic understanding of Java programming language. Although it is a beginners’ course, we assume that the readers have a reasonable exposure to any programming environment and knowledge of basic concepts such as variables, commands, syntax, etc. We strongly recommend that you gain some basic knowledge of Java programming language before proceeding with Kotlin programming.

  • Object-Oriented Programming
    • Introduction to Object-Oriented Programming
    • Encapsulation
    • Inheritance
    • Polymorphism
    • Abstraction
  • What is Kotlin?
  • History of Kotlin
  • How to install Kotlin on your computer?
  • Introduction to IntelliJ IDEA
  • First kotlin program

  • Datatypes in Kotlin
  • Variables in Kotlin
  • Using Comments in Kotlin

  • Assignment Operator
  • Arithmetic Operator
  • Relational Operators
  • Logical Operators
  • Increment and Decrement Oprators
  • Oprate-Assign Operators(+=,etc.)
  • The Conditional Operator
  • Operator Precedence
  • Type Conversion in Kotlin

  • Functions in Kotlin
  • if else
  • for loop
  • while doWhile
  • when
  • Ranges in Kotlin

  • One Dimentional Arrays
  • Multi-Dimentional Arrays
  • Using For loop in Arrays

  • Classes and Objects
  • Fields and Functions
    • Calling Functions
    • Defining Functions
    • Function Parameters
    • Variable argument parameters functions
  • Constructors
    • Primary Constructor
    • init block in constructors
    • this keyword
    • Secondary Constructor
    • Access Modifiers in Kotlin (private, public, protected, internal)
    • Non-Access Modifier (Companion Object, final, abstract)

  • Inheritance
  • Inheritance in Kotlin
  • Function Overriding
  • final functions
  • Abstract Classes
  • Interfaces in Kotlin

  • Inner Classes Concept
  • Anonymous Inner Class
  • Packages
  • Defining Packages
  • Package Scope
  • The import Statement

  • Exception Overview
  • Catching Exceptions
  • The Finally Block
  • Exception Functions
  • Declaring Exceptions
  • Defining and Throwing Exceptions

  • The Collection Framework
  • The List Implementation in Kotlin
  • Set Implementation Classes in Kotlin
  • Map Implementation Classes in Kotlin

  • Hello World App using Kotlin - Android

Review :