Kotlin Apprentice — First 18 Chapters Now Available!

The second early access release of our Kotlin Apprentice book is now available! By Chris Belanger.

Save for later


Hide contents

Kotlin Apprentice — First 18 Chapters Now Available!

5 mins

Great news everyone: The second early access release of our Kotlin Apprentice book is now available!

Heard of Kotlin, but haven’t yet started to learn the language? Or maybe you want to explore some more advanced aspects of the language? The Kotlin Apprentice is here to help you out!

This release adds six more chapters:

  • Chapter 7: Nullability: Many programming languages suffer from the “billion dollar mistake” of null values. You’ll learn about how Kotlin protects you from the dreaded null pointer exception.
  • Chapter 16: Interfaces: Classes are used when you want to create types that contain both state and behavior. When you need a type that allows primarily the specification of behavior, you’re better off using an interface. See how to create and use interfaces.
  • Chapter 17: Enum Classes: Enumerations are useful when you have a quantity that can take on a finite set of discrete values. See how to define and use enum classes and see some examples of working with enum classes and when expressions.
  • Chapter 20: Exceptions: No software is immune to error conditions. See how to use exceptions in Kotlin to provide some control over when and how errors are handled.
  • Chapter 21: Functional Programming: Kotlin goes beyond just being an object-oriented programming language, and provides many of the constructs found in the domain of functional programming. See how to treat functions as first-class citizens by learning how to use functions as parameters and return values from other functions.
  • Appendix A: Kotlin Platforms: Now that you’ve learned about how to use Kotlin, you may be asking yourself: Where can I apply all of this knowledge? There are many different platforms that allow you to use Kotlin as a programming language. Anything that runs Java can run Kotlin, and there are very few machines that can’t run Java. In this chapter, you’ll learn about the top platforms for Kotlin and what to watch out for.

Chapters to come will cover objects, generics, Kotin/Java interoperability, coroutines scripting and more.

This is the second early access release for the book — keep an eye out for another early access release soon!

Where to Go From Here?

Here’s how you can get your early access copy of Kotlin Apprentice:

The Kotlin Apprentice is a book geared toward complete beginners to Kotlin. It’s ideal for people with little to no prior programming experience, but it’s also excellent for people who have prior programming experience and are looking to get up-to-speed quickly with the Kotlin language.

The book focuses on the core Kotlin language itself — not building Android apps. If you’re brand-new to Kotlin, we recommend reading this book first, and then working through the our companion book Android Apprentice after that.

Here’s a sneak peek of what’s inside:

  • Coding Essentials and your IDE: We start you off right at the beginning so you can get up to speed with programming basics. Learn how to work with Intellij IDEA, which you will use throughout the rest of the book.
  • Nullability: Kotlin helps you avoid the “billion dollar mistake” by only allowing data to be null if you explicitly allow it.
  • Arrays, Lists, Maps, and Sets: Why have only one of a thing when you could have many? Learn about the Kotlin collection types — arrays, lists, maps, and sets — including what they’re good for, how to use them, and when to use each.
  • Lambdas: Put code into variables and pass code around to help avoid callback insanity!
  • Kotlin and Java Interoperability: Kotlin is designed to be 100% compatible with Java and the JVM. Seamlessly use Kotlin in your Java projects and call back and forth between the languages.
  • Kotlin Coroutines: Simplify your asynchronous programming using Kotlin coroutines, and discover the differences between coroutines and threads.
  • And much more!: We’ll take you through programming basics, object-oriented programming with classes, exceptions, generics, functional programming, and more!

Questions about the book? Ask them in the comments below!