Kotlin Essential Training

Kotlin Essential Training

3h 31mIntermediate2020-02-12

Authors

Troy Miles

Troy Miles

Award-winning Software Engineer, Speaker, and Author

Course details

Kotlin, the powerful programming language from JetBrains, offers null safety, concise syntax, and 100% Java compatibility. Plus, it's fully supported by Google for Android development. If you're looking to get up and running with this popular language, then this course is for you. Join instructor Troy Miles as he provides a comprehensive overview of what developers need to create command-line programs using the Kotlin programming language. Troy starts by covering the basics: data types and variables, how statements differ from expressions, and what the different types of expressions are. He then dives into all of the language's essential features, from functions and classes to coroutines, as well as how to effectively debug your Kotlin code.

Topics include:
- Working with variables
- Tips and tricks for working with functions
- Creating classes in Kotlin
- Working with companion objects
- Debugging your code
- Working with coroutines
- Handling canceled or timed-out tasks

Skills covered

IntelliJ IDEAJetBrainsKotlinJavaOracleEssential TrainingProgramming LanguagesOpen SourceSoftware Development

Concepts

Introduction

  • Welcome
  • What you should know

Kotlin Development Preparations

  • Intellij IDEA installation and quick start guide

Data Types

  • Numeric data types
  • Mutable and immutable variables
  • Boolean and char data types
  • String tricks and traps

Control Flow

  • How statements differ from expressions
  • The if expression
  • The when expression
  • Loops with when expressions
  • Nulls and smart casting
  • Challenge - Replace an if expression with a when
  • Solution - Replace an if expression with a when

Collections and Sequences

  • When to use arrays
  • When to use lists
  • Sets best practices
  • How to use maps as dictionaries
  • Use collection operations
  • Sequences used in asynchronous data
  • Challenge - Remove duplicates from a list
  • Solution - Remove duplicates from a list

Input, Output, and Files

  • Command-line arguments
  • Get user input
  • Read and write file data
  • Challenge - Create and filter a list from a text file
  • Solution - Create and filter a list from a text file

Functions

  • Functions
  • Lambda functions
  • Anonymous functions
  • Local functions
  • Challenge - Pass a function to another function
  • Solution - Pass a function to another function

Classes, Objects, and Interfaces

  • Kotlin classes
  • Constructors and init block
  • The beauty of data classes
  • Class composition with interfaces
  • Companion objects
  • Challenge - Count instances of a class
  • Solution - Count instances of a class

Debug Your Kotlin Code

  • Set unconditional and conditional breakpoints
  • Watch variables and change their values

Harness the Power of Coroutines

  • The need for coroutines
  • How to handle canceled and timed-out tasks
  • Challenge - Read a file in the background
  • Solution - Read a file in the background

Conclusion

  • Next steps
80,000 Toman