Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

LinkedIn Learning

Kotlin for Java Developers

via LinkedIn Learning

Overview

Learn the basics of Kotlin—a concise, easy-to-use programming language from JetBrains—and explore its interoperability with Java.

Kotlin is a concise, easy-to-use programming language from JetBrains that's 100% compatible with Java, and is an officially supported development language for Android. With its clean syntax and ability to eliminate most null pointer exceptions, Kotlin makes coding easier, faster, and generally more fun. In this course, learn the basics of Kotlin programming and explore its interoperability with Java. Troy Miles explains why you might want to learn this language, and walks through some of its key features, including operator overloading, generics, and lambdas. Plus, Troy shows how to call Java libraries from Kotlin—and vice versa—and covers functional programming in Kotlin.

Syllabus

Introduction
  • Welcome
  • What you should know
  • How to use the exercise files
1. Kotlin as a Better Java
  • Why a new JVM language?
2. Get Started with Kotlin
  • Online
  • IntelliJ IDEA
  • Set up a Kotlin programming environment
3. Basic Kotlin Programming
  • Val vs. var
  • Type system
  • Comments
  • Control flow – if
  • Control flow – when
  • Control flow – loops
  • Control flow – advanced loops
  • Functions
  • Packages
  • Challenge: Implement fizz buzz
  • Solution: Implement fizz buzz
4. Object-Oriented Programming
  • Classes
  • Objects
  • Interfaces
  • Generics
  • Challenge: Create a function to return the smaller of two values
  • Solution: Create a function to return the smaller of two values
5. Java Interop
  • Use Java from Kotlin
  • Use Kotlin from Java
6. Advanced Kotlin Features
  • Operator overloading
  • Annotations
  • Reflection
  • DSL construction
  • Destructuring
  • Challenge: Overload the plus and minus operators for a data class
  • Solution: Overload the plus and minus operators for a data class
7. Functional Programming in Kotlin
  • Functional programming
  • Lambdas
  • Closures
  • Method chaining
  • funKTionale library
  • Composition
  • Currying
  • Partial application
  • Memoization
  • Challenge: Find the student with the shortest name
  • Solution: Find the student with the shortest name
Conclusion
  • Next steps

Taught by

Troy Miles

Related Courses

Reviews

Start your review of Kotlin for Java Developers

Never Stop Learning!

Get personalized course recommendations, track subjects and courses with reminders, and more.

Sign up for free