Duration
3 days
Overview
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 a new open source programming language like Java, JavaScript, etc. It is a high level strongly statically typed language. Currently, Kotlin targets Java and JavaScript. It runs on Java Virtual Machine.
Kotlin is influenced by other programming languages such as Java, Scala, Groovy, Gosu, etc. The syntax of Kotlin may not be exactly similar to JAVA, however, internally Kotlin is reliant on the existing Java Class library to produce wonderful results for the programmers. Kotlin provides interoperability, code safety, and clarity to the developers around the world.
Target Participants
This program is directed at programmers interested in programming with Kotlin.
Program prerequisite
This course is designed for Developers who wish to know how to develop applications using Kotlin. Having a basic understanding of Java Programming Language is an added value.
Course Objectives
Participants will learn how to:-
- Set up and install Kotlin and InteliJ IDEA
- Understand all concepts of Kotlin Programming Language
- Understand the relationship between Kotlin and Java
- Create your first Android Application using Kotlin
- Learn the concepts of Lambdas and High Order Functions
- Learn about the Kotlin Standard Library
- Learn how to use Collection Classes in Kotlin
- Learn Object Oriented Programming Concepts
- Understand the use of Generics in the Kotlin Programming Language
Mode of delivery
Every participant will be provided with course notes and are required to bring in their own laptops for hands-on exercise and practice session.
Introduction
- Installing the JDK
- Installing the Intellij IDEA
- Basic Syntax
- Language Features
- Functional Programming
- Object Oriented Programming
Basics
- Static Typing and Type Inference
- Mutable and Immutable variables
- Comments
- Packages
- Basic Data Types
- String and String Templates
- Any Type
- Unit Type
- Nothing Type
- Explicit Casts and Smart Casts
- Operators
- Nullable Types
- Safe Call Operator
- Elvis Operator
- Not Null Assertions
Control Flow
- If statements and Expressions
- When Statement and Expressions
- While and Do-While loops
- Ranges and Progressions
- For Loop
- Returns and Jumps
Functions
- Top Level Functions
- Member and Local Functions
- Named Parameters / Arguments
- Default Parameters / Arguments
- Infix Calls
- Variable Arguments and Spread Operator
- Overloaded Functions
- Extension Functions
Standard Library Functions
- Apply, let and with
- Run, lazy and use
- Repeat (require, assert and check)
Operator Overloading
Overview
- Compound Assignment Operators and Unary Operators
- Comparison Operators
Lambda Expressions
Overview
- Higher Order Functions
- Variable Scope
- Use in the Java APIs
- Returning Functions from Functions
- Inline Functions
Object Oriented Concepts
Overview
- Classes
- Encapsulation
- Constructors
- Abstraction
- Interfaces
- Inheritance
- Polymorphism
OOP in Kotlin
- Classes and Constructors
- Properties and Fields
- Visibility Modifiers
- Inner and Nested Classes
- Interfaces
- Inheritance
- Data Classes and Delegation
- Generics
- Enum Classes
- Arrays
- Sealed Classes
- Singletons
- Companion Objects
- Anonymous Objects
- Delegation
- Delegated Properties
Exceptions
Overview
- Kotlin Exceptions
Collections
- Overivew
- Kotlin Collections Classes
- Lists
- Sets
- Maps
- Traversing a Map
- Manipulating Collections
- Quantifiers
Generics
Overview
- Kotlin Generics
- Generic Constraints
- Type Variance
- Type Projections
Annotations
Overview
- Standard Annotations
- Common Java Annotations
- Creating Annotations
Interop
- Calling Java from Kotlin
- Calling Kotlin from Java
Kotlin on Android
- Installing Android Studio IDE
- Creating an Android Studio Project
- Android SDK Manager / Tools
- The Android Emulator
- Compiling and Running first Android Application
Programme scope, delivery arrangements and suitability are confirmed during enquiry.