ShapeShapeGrouppointGroupchapter-listShapeShape Copy 12ShapeShape Copy 3ShapeGroupShapedropdowneditoreditorCombined ShapegridShape Copy 4Shape Copy 7ShapelanguagelanguageShapemegaphonepaperbackShapeplatformnoun_419259-2 copyplay-iconBS-Question-Rounded-Circlequotesnoun_610406stacked-books-1stacked-books-2Shape Copy 5 Combined Shape Group Group Group Group Group Group
New

Kotlin Apprentice

$54.99
  • Platform Android4.4+
  • Language Kotlin1.2
  • Editor IntelliJIDEA

Learn programming with Kotlin! The Kotlin Apprentice is a book designed for complete beginners to Kotlin.

Note: this digital edition is currently under development and available in early-access format. You’ll be notified via email when the final edition is complete.

Estimated full release date: May 2018

Developer Guide

Beginner

For beginner iOS developers

This book is for complete beginners to Kotlin. No prior programming experience is necessary!

This is a book for complete beginners to the new, modern Kotlin language.

Everything in the book takes place in a clean, modern development environment, which means you can focus on the core features of programming in the Kotlin language, without getting bogged down in the many details of building apps.

This is a sister book to the Android Apprentice the Android Apprentice focuses on making apps for Android, while the Kotlin Apprentice focuses on the Kotlin language fundamentals.

We also recommend

Kotlin Apprentice

1.

Coding Essentials and your IDE

Get a quick-start introduction to Kotlin and how to use Intellij IDEA to work with the projects through this book.

2.

Expressions, Variables & Constants

This is it, your whirlwind introduction to the world of programming! You’ll begin with an overview of computers and programming, and then spend your time working with code comments, arithmetic operations, constants and variables.

3.

Types & Operations

You’ll learn about handling different types, including strings which allow you to represent text. You’ll learn about converting between types and you’ll also be introduced to type inference which makes your life as a programmer a lot simpler.

4.

Basic Control Flow

You’ll learn how to make decisions and repeat tasks in your programs by using syntax to control the flow. You’ll also learn about Booleans, which represent true and false values, and how you can use these to compare data.

5.

Advanced Control Flow

Continuing the theme of code not running in a straight line, you’ll learn about another loop known as the `for` loop. You’ll also learn about when expressions which are particularly powerful in Kotlin.

6.

Functions

Functions are the basic building blocks you use to structure your code in Kotlin. You’ll learn how to define functions to group your code into reusable units.

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.

8.

Arrays and Lists

Arrays and lists are the most common collection types you’ll run into in Kotlin. They both are typed like regular variables and constants, and store multiple values in a single data structure. See how to iterate through arrays and lists and how to modify their contents.

9.

Maps and Sets

Maps are useful when you want to look up values by means of an identifier. For example, the table of contents of this book maps chapter names to their page numbers, making it easy to skip to the chapter you want to read. With an array, you can only fetch a value by its index, which has to be an integer, and all indexes have to be sequential. In a map, the keys can be of any type and are generally in no particular order. You'll also learn about Sets, which let you store unique values in a collection.

10.

Lambdas

A previous chapter taught you about functions. But Kotlin has another construct you can use to break up code into reusable chunks: lambdas. These have many uses, and become particularly useful when dealing with collections such as a list or map.

11.

Classes

In this chapter, you’ll get acquainted with classes, which are are named types. Classes are one of the cornerstones of object-oriented programming, a style of programming where the types have both data and behavior. In classes, data takes the form of properties and behavior is implemented using functions called methods.

12.

Objects

Kotlin has a special keyword object that makes it easy to follow the Singleton pattern in your projects, and that is also used to create properties specific to a class and not its instances. You also use the keyword to create anonymouse classes.

13.

Properties

In this chapter, you’ll learn more about Kotlin properties, along with some tricks to deal with properties, how to monitor changes in a property’s value and how to delay initialization of a property.

14.

Methods

Methods are merely functions that reside in a class. In this chapter, you’ll take a closer look at methods and see how to add methods onto classes that were created by someone else.

15.

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.

16.

Advanced Classes

Having seen the basics of creating classes, in this chapter you'll see the more advanced aspects of object-oriented programing, including inheritance and limiting member visibility.

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.

18.

Generics

At some point you will need to ability to create abstractions that go beyond what's available in regular classes and functions. You'll learn how to use generics to super-power your classes and functions.

19.

Kotlin/Java Interoperability

Kotlin was designed from the start to be 100% compatible with Java and the Java ecosystem. See how to work with Kotlin and Java together in a single project and how to call back and forth between the two.

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.

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.

22.

Conventions and Operator Overloading

You'll learn the concept of conventions and see how to use conventions to implement operator overloading and write more concise but still readable code.

23.

Kotlin Coroutines

Kotlin coroutines allow you to simplify your asynchrounous code and make it much more readable. You'll learn the difference between threads and coroutines and see examples of coroutines in use.

24.

Scripting with Kotlin

Kotlin is not just useful on Android or the JVM, but also can be used for scripting at the command line. See how to use Kotlin as a scripting language.

Meet the authors

Joe Howard Android Team Lead
Richard Lucas Android Team
Irina Galata Android Team
Ellen Shapiro Android Team

Get the Kotlin Apprentice

Learn programming with Kotlin! The Kotlin Apprentice is a book designed for complete beginners to Kotlin.

Top