When you enroll through our links, we may earn a small commission—at no extra cost to you. This helps keep our platform free and inspires us to add more value.

Object Oriented Programming with Kotlin 1
The Kotlin designers took the experience of Java and used it to make Kotlin a better OO language. For example, classes are 'public' and 'final' by default. This course shows you how to use such Kotlin features to create better objected oriented code.

This Course Includes
pluralsight
3 (23 reviews )
2 hour 58 minutes
english
Online - Self Paced
core courses
pluralsight
About Object Oriented Programming with Kotlin 1
Kotlin is a more modern version of Java. Being Java like, Kotlin has a strong Object Oriented foundation and builds on that foundation to offer features that are not found in Java. In this course, Object Oriented Programming with Kotlin 1, you will learn how to exploit those features to build object oriented applications. First, you will cover the basics such as defining classes in Kotlin, abstract base classes and interfaces. You will look at class derivation and the fact that Kotlin classes are ‘closed’ by default. Next, you will explore Kotlin’s construction mechanism and the fact that In Kotlin, classes have a single ‘primary’ constructor but can also have ‘secondary’ constructors, although you will see why these are not often necessary. You will also look at what you can do if a class requires more complex construction. Finally, you will discover how Kotlin supports ‘Nested’ and ‘Inner’ classes and also anonymous inner classes and see why these are important and where they might be used. Kotlin also provides ‘Data Classes’ that are used as ‘DTOs’, they provide automatic support for ‘hashCode’ and ‘equals’ methods so make them easy to use in containers such as collections. Kotlin does not have the concept of ‘static’ methods, but instead has ‘companion’ objects, these are Singletons and you will see where and how to use these in your code. Kotlin classes can also be generic. You will be introduced to the idea of generic types and be shown how they are used in your code. By the end of this course, you will be able to write small snippets of sample code to demonstrate the topics covered, and also have the knowledge required to write a complete application, bringing together the material to show how to apply object oriented techniques in practice.
What You Will Learn?
- Course Overview : 1min.
- Building Classes in Kotlin : 26mins.
- Using Constructors for Initialization : 18mins.
- Understanding Derivation : 16mins.
- Providing Abstraction with Abstract Classes and Interfaces : 25mins.
- Bringing It All Together : 41mins.
- Understand Generics: Kotlin's Improved Generic Support : 35mins.
- The Lack of Statics and How Kotlin Overcomes That with Companion Objects : 5mins.
- Using Data Classes for DTOs : 8mins.