We may earn an affiliate commission when you visit our partners.
Dmitri Nesteruk

This is a course on the Kotlin programming language. Kotlin is a programming language made by JetBrains which targets the JVM. Kotlin is designed to be a better Java. It is more concise, safer, has better support for functional programming and is designed to speed up everyday development tasks. Kotlin also has great tool support, since it's made by the makers of IntelliJ IDEA, the world leading IDE.

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:

Read more

This is a course on the Kotlin programming language. Kotlin is a programming language made by JetBrains which targets the JVM. Kotlin is designed to be a better Java. It is more concise, safer, has better support for functional programming and is designed to speed up everyday development tasks. Kotlin also has great tool support, since it's made by the makers of IntelliJ IDEA, the world leading IDE.

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 (I use IntelliJ)

  • 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.

Enroll now

What's inside

Learning objectives

  • 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!

Syllabus

Where to get Kotlin and how to start using it

A brief overview of why Kotlin is so good.

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

Read more

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

Learn Kotlin's take on data types and variable declarations

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

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

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.

Powerful control flow constructs you will love

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.

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.

This ain't your father's for loop!

Kotlin's powerful alternative to Java's switch.

Lots of unusual things here!

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

Kotlin supports default argument values and calls with named arguments.

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

Functions within functions.

Explains how functions such as downTo are implemented.

Kotlin's lambdas are so powerful they get their own section

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!

Functions taking functions, but why?

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

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

Discover the power of data classes, traits and more!

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

Give any type additional functionality.

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

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!

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

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.

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.

Kotlin's equivalent of LINQ and the like

A discussion of Kotlin collection support and why it rocks.

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.

Counting how many elements fit a predicate.

Mapping each element to something else.

Compressing a sequence to a single value.

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

Splitting a sequence based on a criterion.

Grouping elements by a particular key.

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

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

Operations on algebraic sets.

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

Master the power and flexibility of Kotlin's reflection

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!

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.

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

Learn to work with references to class constructors.

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

All that other cool stuff

Type aliases provide alternative names for existing types.

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.

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

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Designed for Java developers, this course helps learners transition to Kotlin, a modern language for the JVM, and leverage their existing knowledge
Covers Kotlin's collection operations, which can efficiently process data sets, a common task in Java development
Explores Kotlin's features like type inference and smart control flow, which aim to reduce boilerplate and increase code succinctness compared to Java
Examines Kotlin's approach to nullability, which helps developers avoid NullPointerExceptions, a common issue in Java
Taught using IntelliJ IDEA Community Edition, which is made by the same company that developed Kotlin, ensuring great tool support and integration
Discusses Kotlin's reflection capabilities, highlighting its ability to identify singletons and companion objects, features not readily available in Java reflection

Save this course

Save Introduction to Kotlin for Java Developers to your list so you can find it easily later:
Save

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Introduction to Kotlin for Java Developers with these activities:
Review Java Fundamentals
Strengthen your understanding of Java fundamentals to better grasp Kotlin's improvements and differences.
Show steps
  • Review Java syntax and data types.
  • Practice writing basic Java programs.
  • Study object-oriented programming concepts in Java.
Read 'Kotlin in Action'
Deepen your understanding of Kotlin by reading a comprehensive guide that covers both basic and advanced concepts.
Show steps
  • Read the first few chapters covering basic syntax and data types.
  • Work through the examples and exercises in the book.
  • Focus on chapters that cover Kotlin's unique features, such as null safety and coroutines.
Convert Java Code to Kotlin
Improve your Kotlin skills by converting existing Java code snippets to their Kotlin equivalents.
Show steps
  • Select Java code snippets from your previous projects or online resources.
  • Convert the Java code to Kotlin, paying attention to syntax differences and best practices.
  • Compare your Kotlin code with online examples or solutions to identify areas for improvement.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Build a Simple Android App in Kotlin
Apply your Kotlin knowledge by building a simple Android application, leveraging Kotlin's features for Android development.
Show steps
  • Set up an Android development environment with Kotlin support.
  • Design a simple app with a few basic features, such as displaying a list or handling user input.
  • Implement the app's functionality using Kotlin, taking advantage of Kotlin's null safety and other features.
  • Test the app on an emulator or physical device.
Write a Blog Post on Kotlin vs. Java
Solidify your understanding of Kotlin's advantages by writing a blog post comparing Kotlin and Java.
Show steps
  • Research the key differences between Kotlin and Java.
  • Write a blog post highlighting the advantages of Kotlin over Java, such as null safety, conciseness, and functional programming support.
  • Include code examples to illustrate your points.
  • Publish your blog post on a platform like Medium or your personal website.
Read 'Effective Kotlin'
Learn best practices for writing idiomatic and efficient Kotlin code by reading a book dedicated to effective Kotlin programming.
View Kotlin Coroutines on Amazon
Show steps
  • Read the book and take notes on the key recommendations.
  • Apply the best practices to your Kotlin code.
  • Refactor existing code to follow the recommendations in the book.
Contribute to a Kotlin Open Source Project
Deepen your understanding of Kotlin and contribute to the community by contributing to an open-source Kotlin project.
Show steps
  • Find a Kotlin open-source project on GitHub that interests you.
  • Read the project's documentation and contribution guidelines.
  • Identify a bug or feature that you can contribute to.
  • Submit a pull request with your changes.

Career center

Learners who complete Introduction to Kotlin for Java Developers will develop knowledge and skills that may be useful to these careers:
Android Developer
An Android Developer specializes in creating applications for the Android operating system. This course on Kotlin is essential for anyone looking to excel as an Android Developer. Kotlin is now the preferred language for Android development, and the course thoroughly covers how to use it effectively to make applications. The course's coverage of Kotlin's unique features and strengths, like type inference, smart control flow structures, and nullability handling is important. Additionally, the course emphasizes efficient data processing using Kotlin's collection operations, a key skill for any Android developer.
Software Development Engineer
A Software Development Engineer is responsible for designing, developing, and maintaining software systems. This role requires a strong handle on multiple programming languages. This course on Kotlin could be beneficial for engineers who work with the Java Virtual Machine. This course introduces a more modern, expressive and powerful language for the JVM. It covers installing and running Kotlin, type inference, control flow, mutability, nullability, functional programming, and collection operations. These topics help a Software Development Engineer improve the speed and safety of their code.
Software Engineer
A Software Engineer develops and maintains software applications. This role benefits from a strong understanding of multiple programming languages, and this course on Kotlin could be particularly valuable for engineers working within the Java Virtual Machine ecosystem. The course covers Kotlin’s advantages over Java, its more concise syntax, better functional programming support, and its ability to speed up development tasks. By learning Kotlin, a Software Engineer can expand their skillset and gain a competitive edge, especially given Google's official support for Kotlin on Android.
Mobile Application Developer
A Mobile Application Developer creates applications for mobile devices, typically using platforms like Android or iOS. With Google’s official support for Kotlin on Android, this course is incredibly relevant for a mobile developer. The course teaches practical skills in Kotlin, a language designed to be more modern and expressive than Java, which is beneficial for anyone developing on Android. The course's focus on null safety, mutability guarantees, and efficient collection operations can significantly improve the efficiency and reliability of mobile applications.
Backend Developer
A Backend Developer works on the server-side of applications, focusing on databases, logic, and APIs. While Kotlin can be used in various contexts, it is particularly effective for building robust backend systems on the Java Virtual Machine, which this course emphasizes. The course helps a Backend Developer learn how to use Kotlin and its concise syntax to streamline their work. The course covers using Kotlin’s functional literals, delegation functionality, and powerful collection operations which are critical for efficiently managing and processing server-side data.
Application Developer
An Application Developer designs, codes, and tests software applications. This course on Kotlin provides a strong foundation for Application Developers looking to use the JVM ecosystem. The course covers the setup and execution of Kotlin with IntelliJ IDEA, its type inference, control flow structures, mutability options, nullability guarantees and the power of functional literals. These tools may help an Application Developer to build more efficient and reliable software, especially if they are working with Java-based technologies.
Full-Stack Developer
A Full Stack Developer works on both the front and back end of applications. This course on Kotlin can be a great addition to a Full Stack Developer's skill set, allowing them to leverage Kotlin on the server utilizing the JVM. The course emphasizes that Kotlin is a modern language that helps developers write more concise and safer code. The course includes learning about features such as type inference, smart control flow structures, and nullability guarantees. This course may enhance the ability of a Full Stack Developer to use different tools and frameworks on the job.
Technical Lead
A Technical Lead is responsible for guiding a development team and making technical decisions for projects. The course on Kotlin may enhance the knowledge of a Technical Lead, especially if the team works with the Java Virtual Machine. This course will help a Technical Lead understand the benefits of Kotlin, which include conciseness, better support for functional programming, and greater speed. The course covers topics such as type inference, control flow, mutability, nullability, and collection operations. By taking this course, a Technical Lead might make more informed decisions about language and technology choices for projects.
Software Architect
A Software Architect designs the high-level structure of software systems. This course on Kotlin may be helpful for a Software Architect, as they may need to decide which languages and tools to integrate in their projects. The course discusses Kotlin’s design to be a more modern and expressive language that can speed up development. The course covers topics such as type inference, control flow, mutability, nullability, and collection operations, which are all relevant to making architectural decisions. By taking this course, a Software Architect could gain insight to make better decisions regarding JVM-based systems and other relevant tech.
Technology Consultant
A Technology Consultant advises clients on how to use technology to meet their business goals. This role requires a broad understanding of various programming languages, and the course on Kotlin can be helpful for consultants in advising clients who work with the Java Virtual Machine. The course teaches Kotlin’s advantages over Java, including its conciseness, safety, functional programming support, and speed. A Technology Consultant with knowledge of Kotlin could suggest it as a solution for clients looking to modernize their development processes.
Solutions Architect
A Solutions Architect designs and oversees the implementation of software solutions. This role requires a deep understanding of programming languages and technologies. The course on Kotlin may be helpful for a solutions architect, particularly for those who work with the Java Virtual Machine. The course introduces the advantages of Kotlin over Java, it's conciseness, safety, and support for functional programming. By taking this course, a Solutions Architect could be able to recommend Kotlin as a suitable option for specific architectural requirements, especially within Java-centric environments.
DevOps Engineer
A DevOps Engineer works to streamline the software development lifecycle, automating and improving the deployment process. This course on Kotlin may be useful for a DevOps Engineer who works with Java-based systems. The course provides an understanding of the Kotlin language, which is designed to be more concise, safer, and have better functional programming support than Java. By understanding Kotlin, a DevOps Engineer who is also a developer may improve existing infrastructure or create automation tools. The course touches on type inference, control flow and collection operations.
Technical Trainer
A Technical Trainer develops and delivers training programs for software and technologies. This course on Kotlin may be useful for a Technical Trainer looking to expand their curriculum offerings. The course covers the setup and use of Kotlin, along with its advantages over Java, such as its concise syntax and better support for functional programming. A Technical Trainer could use the knowledge from this course to create lessons on Kotlin, helping other professionals learn the language and improve their skills.
Database Administrator
A Database Administrator manages database systems, ensuring their stability and performance. While the course's primary focus is not on databases, the skills learned in Kotlin may be helpful for automating database tasks, writing scripts, or creating data processing tools. The course teaches how to manage collections efficiently, which helps with data manipulation. This course may be a good choice if a Database Administrator wishes to expand their scripting and automation skills as a complement to their database expertise.
Quality Assurance Engineer
A Quality Assurance Engineer tests software to ensure it meets quality standards. While this course is primarily focused on programming rather than quality assurance, there may be certain situations where having familiarity with Kotlin may be helpful for a Quality Assurance Engineer. The course teaches Kotlin’s advantage over Java. The course covers topics such as type inference, control flow, mutability, nullability, and collection operations. This course may be a good fit for a Quality Assurance Engineer interested in automation or learning an additional programming language.

Reading list

We've selected two books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Introduction to Kotlin for Java Developers.
Provides a comprehensive guide to Kotlin, covering everything from basic syntax to advanced features. It's a great resource for Java developers transitioning to Kotlin, as it highlights the key differences and advantages of Kotlin. The book also includes practical examples and exercises to help you solidify your understanding. It is commonly used as a textbook for Kotlin courses.
Provides practical advice and best practices for writing idiomatic and efficient Kotlin code. It covers a wide range of topics, including coding conventions, performance optimization, and error handling. It is more valuable as additional reading than it is as a current reference. This book is helpful in providing background and prerequisite knowledge.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser