Introduction to Kotlin for Java Developers
4.4 (318 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
1,518 students enrolled

Introduction to Kotlin for Java Developers

Learn Kotlin, a modern language for the JVM (now officially supported on Android!)
4.4 (318 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
1,518 students enrolled
Created by Dmitri Nesteruk
Last updated 9/2017
English [Auto]
Current price: $34.99 Original price: $49.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 5 hours on-demand video
  • 16 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Solve problems in Kotlin
  • Understand Kotlin's advantages over Java
  • Effectively leverage Kotlin's null safety and mutability guarantees
  • Speed up work with collection using Kotlin's collection operationrs
  • Have fun with a new JVM language!
Course content
Expand all 54 lectures 04:56:27
+ Introduction to Kotlin
3 lectures 11:30

A brief overview of why Kotlin is so good.

Preview 05:34

A little note about the options available for downloading and installing Kotlin.

Downloading and Installing

Let's set up the IDE and run our first Kotlin program.

Our First Kotlin Program
+ Types and Variables
5 lectures 29:07

Learn about the difference between val and var. Also: there is no new and no semicolons.

Variable Declarations

Thanks to type deduction, most variable type decorations are not necessary. Woo-hoo!

Type Inference

Ranges of values. Self-explanatory, right?


A look at how arrays are represented and used in Kotlin.


Strings aren't complicated, but interpolation makes them more powerful.

Strings and String Interpolation
+ Control Flow
5 lectures 22:56

Kotlin provides powerful support for dealing with nullability. Lean everything about ?, ?., ?: and !!


Yer olde if is an expression that can return values and can appear in interpolated strings.

If Statement

Why should the IDE check if you are risking an NPE, if the compiler can do it just as well? This awesome compiler feature also takes care of type conversions and more.

Preview 02:26

This ain't your father's for loop!

For Iteration

Kotlin's powerful alternative to Java's switch.

When Expression
+ Functions
5 lectures 18:05

Kotlin has functions which are not inside any class. What is this, C++?!?

Top-Level Functions

Kotlin supports default argument values and calls with named arguments.

Return Types and Arguments

Call a function with any number of arguments, comma-separated-like.

Preview 03:03

Functions within functions.

Local (a.k.a. Nested or Inner) Functions

Explains how functions such as downTo are implemented.

Infix Functions
+ Lambda Functions
4 lectures 15:39

Yay, lambdas! Oh, wait, Java has lambdas too? Yeah, but not like these!

Warning: Kotlin lambdas may or may not be cached when passed into Java event listeners. Be careful!

Lambda Functions

Functions taking functions, but why?

Higher-Order Functions

Define the context of the function's operation. Advanced topic!

Preview 01:50

Give a class a magic method called invoke and call it like a function (a.k.a. functor).

+ Classes
10 lectures 46:27

What, no fields? With Kotlin, forget about fields and getter/setter hell: properties take care of it all!


Give any type additional functionality.

Extension Functions and Properties

Primary constructors provide an epic level of succinctness. But if you need to do more than initialize some fields, init block to the rescue!

Primary Constructors and Initialization

You can override the implementation of a property in an external class. But why?!?

Warning: when you reference this in a delegated property class, you are referring to that class, not the class where the delegated property is going to be used. Be careful!

Delegated Properties

Simple, yet powerful, data classes auto-implement the basic scaffolding for you. Don't worry, you can override anything you don't like!

Data Classes

Kotlin lets you make Singletons with ease. It doesn't have static functions, but companion objects are a close alternative.


Kotlin doesn't have statics. But you can still get them, in a way.

Preview 05:17

Learn about the override keyword, base call disambiguation, opening types and more.


Interfaces... can contain properties as well as functions.


The Decorator pattern is essentially built-in in Kotlin.

Class Delegation
+ Collection Operations
12 lectures 01:33:15

A discussion of Kotlin collection support and why it rocks.

Preview 02:18

Let's dig into kotlin-runtime.jar and find all the classes related to collection operations as well as sequences. We'll also learn how to make sequence generators: a useful feature that we'll use throughout this entire section.

API Overview and Sequence Generators

Counting how many elements fit a predicate.

Quantifiers (any, all, count, contains)

Mapping each element to something else.

Preview 13:45

Compressing a sequence to a single value.

Aggregation (fold, reduce, joinToString)

Keeping elements satisfying (or not) a particular predicate and throwing all others away.

Filtering (filter, filterNot)

Splitting a sequence based on a criterion.

Partitioning (drop & take)

Grouping elements by a particular key.

Grouping (groupBy)

Sorting a data set by one or more of its properties.

Sorting (sortedBy, sortedWith, compareBy, thenBy)

Operations which try to access an individual element of the collection.

Element Operations (first, last, single, elementAt)

Operations on algebraic sets.

Set Operations (distinct, intersect, union, subtract)

A summary of all the collection operations we've discussed in this section of the course.

+ Reflection
5 lectures 30:06

Yeah, Java has reflection too, but can you tell if your object is a singleton or a companion object? Of course not. Kotlin reflection to the rescue!

Class Reflection

Learn to work with references to functions. Remember, functions are everywhere in kotlin. Got a property? Well, its getters/setters are functions. Also you get to see how to handle references to function overloads.

Function References

Learn to work with property references. Remember, typical val/var declarations are properties too!

Property References

Learn to work with references to class constructors.

Constructor References

Function and property references can also bind itself to an instance of the receiver.

Bound References
+ Odds & Ends
5 lectures 29:23

Type aliases provide alternative names for existing types.

Type Aliases

Yes, enumerations, with abstract functions and whatnot.


Kotlin has no checked exceptions. But try-catch is an expression.


But only standard operators, none of that F#-inspired operator <#%$> magic.

Operator Overloads

A look at how function types with receivers, together with lambda expressions, can help us make Groovy-style builders.

Type-Safe Builders
  • A basic knowledge of Java is beneficial

This is a course on the Kotlin programming language. This course is designed for people already familiar with Java who are looking for a more modern, expressive and powerful language for the JVM.

In this course, you will learn about:

  • How to install and run Kotlin and why toolability matters
  • Type inference and how it can save you a lot of time
  • Smart control flow structures that let you write more succinctly
  • Mutability options (val and var), what they mean and how to use them
  • Nullability guarantees and how they make your code more safe
  • The power of functional literals (nested functions and lambdas)
  • Powerful built-in delegation functionality
  • How to leverage Kotlin's collection operations to process data sets efficiently

... and a lot more!

This course is completely live-demo based. All the lectures are examples of real code being edited and executed using the IntelliJ IDEA Community Edition IDE.

Update: Google has just announced official support for Kotlin on Android. Congratulations to the Kotlin team!

Who this course is for:
  • Android developers wishing to learn the latest Google-approved language
  • Java developers looking for a better programming language
  • Developers looking for interesting language design ideas