Book Image

Kotlin Fundamentals [Video]

By : Edvin Syse
Book Image

Kotlin Fundamentals [Video]

By: Edvin Syse

Overview of this book

Kotlin is an easy-to-learn, pragmatic language that has adopted the best traits of other popular languages such as Java, C#, Python, Groovy, and Scala. This video tutorial is your one stop guide to getting started with Kotlin programming, covering the basics, object-oriented features, and even functional programming in Kotlin. You’ll take your first steps in Kotlin programming by building a simple “Hello, Kotlin” program. You’ll explore the basics such as types and syntax, and also basics of object-oriented programming such as classes and inheritance. Next, you’ll dive into Kotlin objects and functions, and see how they’re different from other programming languages. You’ll learn to organize your code and simplify your coding experience with the help of different functions and statements in Kotlin. From there, you’ll lwork with collections and streams, employ loops in your code, and filter data with the help of different collection operations. Finally, you’ll dive into Kotlin’s functional aspects, where you’ll work with extension functions and values, model functions, and overload functions in Kotlin. By the end of this video tutorial, you’ll be well-versed with Kotlin’s fundamental features, and will be ready to begin your career as a Kotlin developer.
Table of Contents (5 chapters)
Chapter 3
Working with Kotlin Objects and Functions
Content Locked
Section 3
Efficient Type Checking with Smart Casts
Checking types and accessing properties after performing a cast often leads to casting exceptions. This video will explain Kotlin has constructs that minimize effort and reduce bugs related to casting. - Learn how to check types on objects - Combine type checking with handy destructuring - Utilize smart casts to avoid casting errors and reduce boiler plate