Kotlin Roadmap

This Kotlin Roadmap is a free, full-text syllabus of 153 lessons in 52 stages, starting with Introduction to Kotlin and ending with AI Development. It suits anyone who wants to learn Kotlin, whether new to it or filling gaps. There is no fixed length: every lesson is open from the start, so you go at your own pace and skip what you already know.

Last updated

Getting Started0%
Halfway
Almost There
Complete

Reading is open to everyone. Sign in to join this roadmap and track what you finish.

Continue learning

1. Introduction to KotlinIntroduction to Kotlin

0%

Introduction to Kotlin

5 topics · 4 sub-topics · 0 completed

0%

Full syllabus: every lesson in the Kotlin roadmap

52 stages and 153 lessons, in the order the roadmap suggests. Every lesson is free to read and open from the start.

  1. Stage 1: Introduction to Kotlin

    • Introduction to Kotlin

      Kotlin is an open-source statically typed programming language that targets the JVM, Android, JavaScript, Wasm, and Native. Kotlin is an open-source, statically-typed programming language that supports both object-oriented and functional programming. It's designed to be concise, safe, and interoperable with Java,…

    • History of Kotlin

      Kotlin is a modern, statically typed programming language developed by JetBrains. It was initially conceived as a new language for the JVM, aiming to address some of the shortcomings of Java while maintaining full interoperability. The project started in 2010 and was open source from very early on. The first…

    • Why use Kotlin

      Kotlin is a modern programming language that makes coding easier and more efficient. It's designed to be simple to learn and use, helping developers write cleaner and more reliable code. Kotlin also works seamlessly with existing Java code, making it easy to integrate into current projects. Kotlin can be used for…

    • Java Interoperability

      Kotlin is 100% interoperable with the Java programming language, and major emphasis has been placed on making sure that your existing codebase can interact properly with Kotlin. You can easily call Kotlin code from Java and Java code from Kotlin. This makes adoption much easier and lower-risk. There's also an…

    • Setting up the Environment

      Setting up the Kotlin environment involves installing the necessary tools and configuring your system to compile and run Kotlin code. This typically includes installing a Java Development Kit (JDK), downloading the Kotlin compiler, and optionally setting up an Integrated Development Environment (IDE) like IntelliJ…

  2. Stage 2: Code Organization

    • Code Organization

      In pure Kotlin projects, the recommended directory structure follows the package structure with the common root package omitted. For example, if all the code in the project is in the org.example.kotlin package and its subpackages, files with the org.example.kotlin package should be placed directly under the source…

  3. Stage 3: main Function

    • main Function

      The main function serves as the entry point for a Kotlin program. When you execute a Kotlin application, the code within the main function is the first to be run. It's where the program's execution begins, and it typically orchestrates the overall flow and logic of the application.

  4. Stage 4: Variables

    • Variables

      Variables are named storage locations in a computer's memory that hold data. Think of them as containers that can store different types of information, like numbers, text, or boolean values (true/false). You give each variable a name so you can easily refer to the data it holds and modify it as needed throughout…

    • val vs var

      In Kotlin, both val and var are used to declare variables, but they differ in mutability. A val variable is immutable, meaning its value cannot be changed after it's initially assigned. Conversely, a var variable is mutable, allowing its value to be reassigned multiple times throughout the program's execution.…

  5. Stage 5: Data types

    • Data types

      Kotlin, like other programming languages, uses data types to classify different kinds of values. These types define what operations can be performed on the data and how much memory it occupies. In Kotlin, everything is an object in the sense that you can call member functions and properties on any variable. While…

    • Type Checks & Casts

      Kotlin allows you to check the type of a variable at runtime using the is operator. This operator returns true if a variable is of a certain type. Furthermore, Kotlin's smart casts automatically cast a variable to a more specific type within a block of code if the compiler can guarantee that the variable is of that…

    • Type Inference

      Kotlin, a statically typed language, introduces type inference to enhance code readability and reduce redundancy, making coding simpler without losing type safety. With Kotlin type inference, the Kotlin compiler automatically deduces types in various contexts, saving developers from explicitly declaring them each time.

  6. Stage 6: Comments

    • Comments

      Comments are explanatory notes added to code to make it easier to understand. In Kotlin, you can add single-line comments using //. Anything after // on the same line is ignored by the compiler. For multi-line comments, you can use / to begin the comment and / to end it. Everything between / and / will be treated…

    • Integers

      Integers in Kotlin are whole numbers without any fractional or decimal parts. Kotlin provides several integer types, each differing in the range of values they can represent. These types include Byte, Short, Int, and Long. The choice of which type to use depends on the size of the number you need to store; using a…

    • Floats

      Floats in Kotlin represent single-precision (Float) and double-precision (Double) floating-point numbers, used to store numbers with decimal points. Float uses 32 bits of memory, offering a smaller range and precision, while Double uses 64 bits, providing a larger range and higher precision. You use them when you…

    • Unsigned Integers

      Unsigned integers in Kotlin are data types that represent whole numbers that cannot be negative. Unlike regular integers (like Int), unsigned integers (like UInt) only store positive values and zero. This allows them to represent a larger range of positive numbers compared to their signed counterparts, given the…

    • Characters

      Characters in Kotlin represent single symbols, like letters, numbers, or punctuation marks. They are denoted by the Char type and are enclosed in single quotes (e.g., 'A', '7', '$'). You can use characters to store and manipulate individual text elements within your programs. Kotlin supports Unicode characters,…

    • Strings

      Strings in Kotlin represent sequences of characters. They are used to store and manipulate text. You can create strings using double quotes (") or triple quotes ("""). Strings are immutable, meaning their value cannot be changed after they are created. Kotlin provides various built-in functions and properties to…

    • Booleans

      Booleans represent truth values: either true or false. They are fundamental for decision-making in code, allowing programs to execute different blocks of code based on whether a condition is met. In Kotlin, the Boolean type is used to declare variables that can hold these two values, enabling logical operations and…

    • Arrays

      Arrays in Kotlin are used to store a fixed-size, sequential collection of elements of the same data type. Think of them as a container that holds multiple values of the same kind, like a list of integers, strings, or even custom objects. You can access each element in the array using its index, which starts from…

  7. Stage 7: Collections

    • Collections

      Collections in Kotlin are structures that hold multiple items together. Think of them as containers for data. They can be lists of things, sets of unique items, or maps that pair keys with values. Kotlin provides built-in collection types like List, Set, and Map, along with functions to easily add, remove, and…

    • Lists

      Lists in Kotlin are ordered collections of items. They can contain elements of the same type, and you can access these elements by their index (position) in the list. Kotlin provides both mutable (changeable) and immutable (read-only) lists, allowing you to choose the appropriate type based on whether you need to…

    • Sets

      Sets in Kotlin are unordered collections of unique elements. This means a set cannot contain duplicate values. Sets support basic operations like adding elements, removing elements, and checking for membership. They are useful when you need to ensure that you only have distinct values in a collection, and the order…

    • Maps

      Maps are data structures that store collections of key-value pairs, where each key is unique. They allow you to efficiently retrieve a value based on its associated key. Think of them like dictionaries where you look up a word (the key) to find its definition (the value). Kotlin provides built-in support for maps,…

    • read-only vs mutable

      Kotlin distinguishes between read-only and mutable collections. Read-only collections provide methods to access data but not to modify it, ensuring data integrity. Mutable collections, on the other hand, allow for adding, removing, and updating elements, offering flexibility when data manipulation is required.…

    • Iterators

      Iterators are objects that allow you to traverse through the elements of a collection (like a list or a set) one by one. They provide a way to access each item in the collection sequentially without needing to know the underlying structure of the collection. You can use iterators to read the elements, and in some…

  8. Stage 8: Ranges

    • Ranges

      Ranges in Kotlin define an interval of values. You can create them using the .. operator, for example, 1..5 creates a range from 1 to 5 (inclusive). Ranges are commonly used in for loops to iterate over a sequence of numbers or characters, and you can check if a value falls within a range using the in operator.…

  9. Stage 9: Progressions

    • Progressions

      Progressions in Kotlin define a sequence of values within a specific range, typically with a defined step. They are most commonly used with numeric types like Int, Long, and Char. Progressions allow you to iterate over a series of numbers or characters in a controlled manner, either increasing or decreasing. Kotlin…

  10. Stage 10: Printing data

    • Printing data

      In Kotlin, you can display information to the console using the println() and print() functions. println() prints the given argument to the standard output and adds a newline character at the end, moving the cursor to the next line. print(), on the other hand, prints the argument without adding a newline, so…

    • print & println

      In Kotlin, print and println are fundamental functions used to display output to the console. The print function displays its argument without adding a newline character at the end, meaning subsequent output will appear on the same line. Conversely, the println function displays its argument and then adds a newline…

    • String Templates

      String templates in Kotlin allow you to embed variables and expressions directly within strings. Instead of using string concatenation, you can include variables by prefixing them with a dollar sign ($). For more complex expressions, you can enclose them in curly braces ${}. This makes string construction more…

  11. Stage 11: Sequences

    • Sequences

      Sequences in Kotlin provide a way to perform operations on collections of data in a lazy manner. Instead of processing each element immediately, sequences evaluate operations only when the final result is needed. This can lead to significant performance improvements, especially when dealing with large datasets or…

  12. Stage 12: Conditional Expressions

    • Conditional Expressions

      Conditional expressions allow you to execute different blocks of code based on whether a condition is true or false. They provide a way to make decisions within your program, enabling it to respond differently to various inputs or situations. In Kotlin, this is primarily achieved using if and when expressions.…

    • Label Loops

      Label loops in Kotlin allow you to control which loop is exited or continued when using break or continue statements within nested loops. By assigning a label (an identifier followed by @) to a loop, you can specify which loop the break or continue statement should affect. This is particularly useful when you want…

    • break & continue

      In Kotlin, break and continue are control flow statements used within loops. The break statement immediately terminates the loop's execution and transfers control to the next statement after the loop. Conversely, the continue statement skips the rest of the current iteration of the loop and proceeds to the next…

    • for

      The for loop in Kotlin is used to iterate over a range, collection, or any other iterable object. It executes a block of code for each element in the sequence. You can use it to go through numbers in a specific range, items in a list, or characters in a string, performing the same action on each one. The for loop…

    • while

      In Kotlin, while and do-while loops are used to repeatedly execute a block of code based on a condition. The while loop checks the condition before each execution of the block; if the condition is true, the block executes, and the process repeats. The do-while loop, on the other hand, executes the block at least…

    • if

      To use if in Kotlin, add the condition to check within parentheses () and the action to take if the result is true within curly braces {}. You can use else and else if for additional branches and checks.

    • when

      In Kotlin, the when expression is a powerful control flow statement used to execute different blocks of code based on different conditions. It's similar to a switch statement in other languages, but more flexible and expressive. The when expression can be used as a statement or as an expression, returning a value…

  13. Stage 13: Loops

    • Loops

      Loops in Kotlin are used to execute a block of code repeatedly. They provide a way to automate repetitive tasks. Kotlin offers several types of loops, including for loops (for iterating over collections or ranges) and while loops (for executing a block as long as a condition is true), and do-while loops (similar to…

  14. Stage 14: Exceptions

    • Exceptions

      Exceptions in Kotlin are a way to handle errors that occur during the execution of a program. When an error happens, an exception object is created and "thrown." This disrupts the normal flow of the program. To handle these exceptions, you can use try, catch, and finally blocks. The try block contains the code that…

    • Throwing Exceptions

      Throwing exceptions indicate when a problem occurs. You can manually throw exceptions with the throw keyword. Throwing an exception indicates that an unexpected runtime error has occurred in the code. Exceptions are objects, and throwing one creates an instance of an exception class. You can throw an exception…

    • Catching Exceptions

      Catching exceptions handle the unexpected exception manually by resolving the issue or notifying the developer or application user. When an exception is thrown, it interrupts the normal execution of the program. You can handle exceptions gracefully with the try and catch keywords to keep your program stable. The…

  15. Stage 15: Standard functions

    • Standard functions

      Kotlin functions are declared using the fun keyword. fun double(x: Int): Int { return 2 x } To call a functions, just: val result = double(2)

    • parameters

      Function parameters are values that you pass into a function when you call it. These parameters act as inputs, allowing the function to operate on different data each time it's invoked. In Kotlin, function parameters are defined using Pascal notation - name: type. Parameters are separated using commas, and each…

    • return

      In Kotlin, the return statement is used within a function to stop its execution and send a value back to the caller. The value returned must match the function's declared return type. If a function doesn't explicitly return a value (its return type is Unit), the return statement is optional at the end of the…

    • varargs

      Varargs (variable arguments) in Kotlin allow a function to accept a variable number of arguments of the same type. Instead of defining multiple function overloads for different numbers of arguments, you can use the vararg keyword in the function's parameter list. This creates a single function that can be called…

  16. Stage 16: Local Functions

    • Local Functions

      Local functions in Kotlin are functions defined inside another function. They provide a way to organize and reuse code within a specific function's scope. This means a local function can only be called from within the function it's defined in, and it has access to the outer function's variables. They are useful for…

  17. Stage 17: Member Functions

    • Member Functions

      Member functions, also known as methods, are functions that are defined inside a class. They operate on the data of that class and can access its properties. You can think of them as actions that an object of that class can perform. They are declared using the fun keyword within the class body, just like regular…

  18. Stage 18: Tail-recursive Functions

    • Tail-recursive Functions

      Kotlin supports a style of functional programming known as tail recursion. For some algorithms that would normally use loops, you can use a recursive function instead without the risk of stack overflow. When a function is marked with the tailrec modifier and meets the required formal conditions, the compiler…

  19. Stage 19: Function Types

    • Function Types

      In Kotlin, functions can be treated as data. A function type represents a specific kind of function, defined by the types of its parameters and its return type. You can assign a function to a variable, pass it as an argument to another function, or return it from a function. This allows for more flexible and…

    • Higher-order Functions

      Higher-order functions in Kotlin are functions that can take other functions as arguments, return functions, or both. This means you can pass a function into another function, treat functions like any other data type (like integers or strings), and even create functions that generate and return new functions. This…

    • Lambda Functions

      Lambda functions in Kotlin are essentially nameless functions that you can treat like values. Think of them as mini-functions you can pass around, store in variables, or execute directly. They're defined using curly braces {} and can take parameters and return a value. They're particularly useful for short, concise…

    • Anonymous Functions

      Anonymous functions in Kotlin are functions without a name. They are defined using a lambda expression but with an explicit return type and the return keyword for returning values. They are useful when you need to define a function inline, often as an argument to another function or when assigning a function to a…

  20. Stage 20: Extension Functions

    • Extension Functions

      Extension functions in Kotlin provide a way to add new functions to existing classes without inheriting from them or using any type of design pattern such as Decorator. This is achieved by defining a function that can be called as if it were a member of the class, even though it's defined outside of it. Extension…

  21. Stage 21: Defining Classess

    • Defining Classess

      In Kotlin, a class is a blueprint for creating objects (instances). You define a class using the class keyword, followed by the class name and curly braces. A class consists of three major parts:

    • Transformations

      Transformations in Kotlin collections involve modifying the elements within a collection to create a new collection. These operations allow you to apply a function to each element, changing its value or structure, without altering the original collection. Common transformations include mapping (changing the value…

    • Filtering

      Filtering in Kotlin collections involves selecting elements from a collection based on a specific condition. This process creates a new collection containing only the elements that satisfy the given predicate, leaving the original collection unchanged. Kotlin provides various built-in functions to perform filtering…

    • plus & minus Operators

      The plus and minus operators in Kotlin collections provide a concise way to create new collections by adding or removing elements from existing ones. The plus operator (+) combines two collections or adds a single element to a collection, returning a new collection containing all elements. Conversely, the minus…

    • Grouping

      Grouping in Kotlin involves organizing elements from a collection into subgroups based on a specific criterion. This operation creates a map where the keys represent the grouping criteria, and the values are lists of elements that satisfy that criteria. It's a way to categorize and structure data within a…

    • Retrieving Collection Parts

      The Kotlin standard library contains extension functions for retrieving parts of a collection. Functions like slice(),take(),drop(), and chunked(), provide a variety of ways to select elements for the result collection: listing their positions explicitly, specifying the result size, and others.

    • Retrieving single elements

      Kotlin collections provide a set of functions for retrieving single elements from list and sets. You can select single elements by position, by condition, with selectors, and even using random selection.

    • Ordering

      Ordering in Kotlin collections involves arranging the elements within a collection (like lists or sets) based on a specific criterion. This can be done in ascending or descending order, either using the natural ordering of the elements themselves (if they are comparable) or by providing a custom comparison function…

    • Aggregate Operations

      Aggregate operations in Kotlin collections transform a collection into a single result. These operations combine the elements of a collection using a specific function. Common examples include finding the sum, average, minimum, or maximum value within a collection. They provide a concise way to derive a summary…

    • Lists

      Kotlin lists offer several operations beyond the general collection operations. These include accessing elements by index (using get() or the [] operator), adding or removing elements at specific positions (using add() or removeAt()), and finding the index of a particular element (using indexOf() or lastIndexOf()).…

    • Sets

      Sets in Kotlin, like in mathematics, are collections of unique elements. Kotlin provides specific operations to manipulate these sets, including union (combining two sets), intersect (finding common elements), and subtract (finding elements present in one set but not the other). These operations create new sets…

    • Maps

      Maps in Kotlin are collections that hold key-value pairs. Map-specific operations allow you to interact with these pairs in targeted ways. These operations include retrieving values based on their keys, adding new key-value pairs, removing pairs, checking if a key or value exists, and iterating through the map's…

  22. Stage 22: Creating Instances

    • Creating Instances

      In Kotlin, creating an instance of a class is straightforward. You simply use the class name followed by parentheses, similar to calling a function. This invokes the class's constructor, which initializes the object. If the class has a primary constructor, you'll need to provide the required arguments within the…

  23. Stage 23: Class Members

    • Class Members

      In Kotlin, a class member refers to the variables (properties) and functions (methods) that belong to a class. Properties hold data associated with the class, defining its state, while methods define the behavior or actions that the class can perform. These members are accessed using the dot notation on an instance…

    • Properties

      Properties in Kotlin classes are variables declared directly inside a class. They represent the state of an object. Each property has a name, a type, and can optionally have a getter and a setter. Getters are used to read the property's value, and setters are used to modify it. If you don't explicitly define them,…

    • Methods

      Methods in Kotlin classes are functions defined within the class that operate on the class's data (properties). They define the behavior of objects created from the class. Methods can perform actions, manipulate data, and return values. They are accessed using the dot notation on an object instance of the class.

    • Constructors

      Constructors in Kotlin are special member functions within a class that are used to initialize objects of that class. They define how an object is created and what initial values its properties will have. Kotlin has two types of constructors: primary and secondary. The primary constructor is part of the class…

    • Nested & Inner Classes

      Kotlin allows you to define classes inside other classes. A nested class is declared inside another class but doesn't have access to the outer class's instance. An inner class, on the other hand, is declared with the inner keyword and does have access to the outer class's instance members. This provides a way to…

    • Object Declarations

      Object declarations in Kotlin provide a way to define a singleton object. This means you create a class and simultaneously declare a single instance of it. The object is initialized lazily when it's accessed for the first time. You can define properties, functions, and even inherit from classes and interfaces…

  24. Stage 24: Inheritance

    • Inheritance

      Inheritance in Kotlin allows you to create new classes (child classes or subclasses) based on existing classes (parent classes or superclasses). The child class inherits properties and functions from the parent class, and can also add its own unique properties and functions or override the parent's behavior. This…

  25. Stage 25: Extension Functions

    • Extension Functions

      Extension functions in Kotlin provide a way to add new functions to existing classes without inheriting from them or using any type of design pattern such as Decorator. This is achieved by defining a function that can be called as if it were a member of the class, even though it's defined outside of the class's…

  26. Stage 26: Visibility Modifiers

    • Visibility Modifiers

      Visibility modifiers control the accessibility of classes, objects, interfaces, constructors, properties, and functions in Kotlin. They determine from where these declarations can be accessed. Kotlin provides four visibility modifiers: private, protected, internal, and public. Each modifier restricts access to…

    • What is Null Safety?

      Null safety is a feature that helps prevent null pointer exceptions, a common cause of program crashes. Kotlin distinguishes between nullable and non-nullable types. By default, variables cannot hold null values. To allow a variable to hold null, you must explicitly declare it as nullable using a question mark (?).…

    • Nullable vs Non-nullable

      In Kotlin, the type system distinguishes between variables that can hold null values (nullable types) and those that cannot (non-nullable types). By default, variables are declared as non-nullable, meaning they must always contain a value. To allow a variable to hold a null value, you must explicitly declare it as…

    • Nullability Check Operators

      Nullability check operators in Kotlin are tools that allow you to safely handle variables that might contain null values. They provide a concise way to access properties or call methods on nullable variables, preventing NullPointerException errors at runtime. These operators include the safe call operator (?.), the…

    • Safe Casts

      Safe casts in Kotlin provide a way to convert a variable of one type to another, but unlike regular casts, they handle the possibility of the cast failing gracefully. Instead of throwing a ClassCastException if the cast is not possible, a safe cast returns null. This allows you to safely attempt a type conversion…

  27. Stage 27: Property Delegates

    • Property Delegates

      Property delegation in Kotlin lets you reuse the logic for getting and setting a property. Instead of putting the getter and setter logic directly inside a class, you create a separate class (the delegate) that handles this logic. Then, you "delegate" the property's access to this class. This helps avoid code…

  28. Stage 28: Coroutines

    • Coroutines

      To support efficient concurrency, Kotlin uses asynchronous programming built around coroutines, which let you write asynchronous code in a natural, sequential style using suspending functions. Coroutines are lightweight alternatives to threads. They can suspend without blocking system resources and are…

  29. Stage 29: Suspending Functions

    • Suspending Functions

      Suspending functions are the foundation of Kotlin's coroutine-based concurrency. They represent a computation that can be paused and resumed later, potentially without blocking the thread. This allows you to write asynchronous, non-blocking code in a sequential, easy-to-read style, improving responsiveness and…

  30. Stage 30: Coroutines Builders

    • Coroutines Builders

      Coroutine builders in Kotlin are functions that start a new coroutine. They bridge the gap between regular, blocking code and the non-blocking, concurrent world of coroutines. Common builders include launch, which starts a coroutine without blocking the current thread and returns a Job, and runBlocking, which…

    • Abstract Class

      An abstract class in Kotlin is a class that cannot be instantiated directly. It's designed to be a blueprint for other classes. Abstract classes can contain both abstract members (methods and properties without implementation) and concrete members (with implementation). Subclasses (derived classes) must implement…

    • Interfaces

      Interfaces in Kotlin are blueprints for classes, defining a set of properties and abstract methods that implementing classes must provide. They allow you to define a contract, ensuring that any class implementing the interface will have specific functionalities. Unlike classes, interfaces cannot store state; they…

    • Data Classes

      Data classes in Kotlin are special classes designed to hold data. The compiler automatically generates useful methods like equals(), hashCode(), toString(), componentN() functions (for destructuring), and copy() for you. This reduces boilerplate code when you primarily need a class to store and manage data.

    • Sealed Class

      A sealed class in Kotlin represents a restricted class hierarchy. It's used when a value can have one of a limited set of types, but no other types. Essentially, it's an abstract class that restricts which classes can inherit from it. All subclasses of a sealed class must be declared in the same file as the sealed…

    • Enum Class

      An enum class in Kotlin is a special type of class that represents a fixed set of possible values, often called "enumerations". Think of it like a list of named constants. Each constant in the enum class is an instance of that class. They're useful when you need to represent a limited number of choices, like days…

    • Inline Class

      An inline class in Kotlin is a special type of class that holds only one property. At runtime, instances of inline classes are represented as the underlying value, avoiding the overhead of object allocation. This allows you to create type-safe wrappers around primitive types or other values without incurring the…

    • Class Generics

      Generics in Kotlin allow you to define classes that can work with different types of data without specifying those types upfront. Think of it like a template for a class. Instead of writing separate classes for handling integers, strings, or other data types, you can create a single generic class that can handle…

    • Type Aliases

      A type alias in Kotlin provides an alternative name for an existing type. It doesn't create a new type; instead, it introduces a new identifier that you can use interchangeably with the original type. This can improve code readability by providing more descriptive names for complex types or simplifying long type…

  31. Stage 31: Understanding Packages

    • Understanding Packages

      Packages are namespaces that organize related classes, interfaces, functions, and other declarations in Kotlin. They provide a way to group code logically, prevent naming conflicts, and control visibility. By using packages, you can structure your project into manageable modules and improve code reusability.

  32. Stage 32: Coroutines Behavior

    • Coroutines Behavior

      Launching a coroutine from a CoroutineScope creates a context that governs its execution. Builder functions like .launch() and .async() automatically create a set of elements that define how the coroutine behaves, including the Job interface, which tracks the coroutine's lifecycle and enables structured…

  33. Stage 33: Asynchronous Flow

    • Asynchronous Flow

      Asynchronous Flow in Kotlin is a feature built upon coroutines that allows you to represent a stream of data that is computed asynchronously. It's designed to handle sequences of values emitted over time, enabling you to perform operations on each emitted value in a non-blocking manner. This is particularly useful…

  34. Stage 34: Coroutines Best practices

    • Coroutines Best practices

      Coroutines in Kotlin simplify asynchronous programming, but using them effectively requires following certain best practices. These include using structured concurrency to manage coroutine lifecycles and prevent leaks, avoiding GlobalScope for most tasks and preferring CoroutineScope tied to specific components,…

  35. Stage 35: Importing Packages

    • Importing Packages

      Packages in Kotlin are namespaces that provide a way to organize and manage code, preventing naming conflicts and improving code reusability. Importing packages allows you to access classes, functions, and other declarations defined within those packages directly, without needing to specify the fully qualified name…

  36. Stage 36: Kotlin Libraries

    • Kotlin Libraries

      Kotlin benefits from a rich ecosystem of libraries, both those specifically designed for Kotlin and those written in Java. This interoperability allows Kotlin developers to seamlessly use existing Java libraries. Additionally, Kotlin offers its own set of libraries, often referred to as KLibs, which provide…

  37. Stage 37: Standard Library

    • Standard Library

      The Kotlin Standard Library is a collection of pre-built functions and classes that are available for use in any Kotlin project. It provides essential tools for common programming tasks, such as working with collections, strings, input/output, and more. This library simplifies development by offering ready-made…

    • Default Imports

      Default imports are a set of pre-defined classes, functions, and interfaces that are automatically available in every Kotlin file without needing explicit import statements. These imports provide access to commonly used functionalities, reducing boilerplate code and making development more convenient. They include…

    • Opt-in Requirements

      Opt-in requirements in Kotlin provide a mechanism to enforce that certain APIs or code constructs are used only when the developer explicitly acknowledges and understands the associated risks or special conditions. This is achieved by marking APIs with annotations that require explicit opt-in, forcing users to…

  38. Stage 38: Documentation

    • Documentation

      Kotlin uses KDoc, a documentation generation tool, to create API documentation from comments in your code. These comments, similar to Javadoc, are placed above declarations (classes, functions, properties, etc.) and use a specific syntax to describe the element's purpose, parameters, return values, and other…

    • KDoc

      KDoc is Kotlin's documentation generation tool, similar to Javadoc for Java. It allows developers to embed documentation directly within their code, using a specific syntax to describe classes, functions, properties, and other elements. This documentation can then be extracted and formatted into a readable,…

    • Dokka

      Dokka is a documentation engine for Kotlin, similar to Javadoc for Java. It generates API documentation in various formats (like HTML, Markdown, and more) from Kotlin source code. Dokka uses KDoc comments within your code to create comprehensive and navigable documentation, making it easier for developers to…

    • Test Library

      kotlin.test is a library in Kotlin that provides a set of tools and functions for writing and running unit tests. It allows developers to verify that their code behaves as expected by defining test cases and assertions. These assertions check if the actual output of a function or code block matches the expected…

    • Coroutines

      Kotlin Coroutines provide a way to write asynchronous, non-blocking code in a sequential style. They allow you to perform long-running tasks, like network requests or database operations, without blocking the main thread, thus preventing your application from becoming unresponsive. Coroutines are lightweight…

    • Serialization

      Serialization is the process of converting an object's state into a format that can be stored or transmitted, and then reconstructed later. This allows you to save data to a file, send it over a network, or store it in a database, and then recreate the original object from that stored representation.…

    • I/O Library

      Kotlin leverages both its own kotlin.io package and the standard Java java.io package for input and output operations. kotlin.io provides a set of extension functions and utilities that simplify common I/O tasks, offering a more Kotlin-idiomatic way to interact with files, streams, and the console. While kotlin.io…

    • Date & Time

      Kotlin leverages Java's java.time package (introduced in Java 8) for handling dates and times, offering classes like LocalDate, LocalTime, and LocalDateTime. Kotlin also provides extensions and convenience functions within its standard library, such as the kotlinx.datetime library, to work with dates and times.…

    • JVM Metadata

      The kotlin-metadata-jvm library provides tools to read, modify, and generate metadata from Kotlin classes compiled for the JVM. This metadata, stored in the @Metadata annotation within .class files, is used by libraries and tools such as kotlin-reflect to inspect Kotlin-specific constructs such as properties,…

    • Gradle Pluggins

      Gradle plugins are reusable components that extend Gradle's build capabilities. They automate tasks like compiling code, running tests, and packaging applications. In Kotlin projects, plugins are often written in Kotlin itself, allowing for type-safe build configurations and leveraging Kotlin's features for more…

  39. Stage 39: Build Tools

    • Build Tools

      Build tools in Kotlin automate tasks like compiling code, running tests, and packaging applications. They manage dependencies, ensuring your project has all the necessary libraries. Popular choices include Gradle and Maven, which use configuration files to define the build process and handle project structure,…

  40. Stage 40: CI/CD Tools

    • CI/CD Tools

      CI/CD tools are software that automates building, testing, and deploying code changes in a software development workflow, enabling faster and more reliable releases of high-quality software. They are the backbone of continuous integration (CI) and continuous delivery/deployment (CD) practices, which automate the…

    • TeamCity

      TeamCity is a powerful and flexible continuous integration and continuous delivery (CI/CD) server developed by JetBrains. It automates the processes of building, testing, and deploying software, allowing development teams to streamline their workflows and deliver high-quality products faster. It integrates with…

  41. Stage 41: I/O

    • I/O

      Input/Output (I/O) in Kotlin refers to how a program interacts with the outside world. This involves reading data from sources like files, the keyboard, or network connections, and writing data to destinations such as files, the console, or network sockets. Kotlin leverages Java's extensive I/O libraries, providing…

    • Creating Files

      In Kotlin, you can create new files using the File class from the java.io package. To do this, you first create a File object representing the desired file path. Then, you call the createNewFile() method on that File object. This method attempts to create a new, empty file at the specified location. It returns true…

    • Writing & Reading Files

      Writing and reading files in Kotlin involves using classes from the java.io package. To write to a file, you typically create a File object and then use classes like FileWriter or BufferedWriter to write data. Reading from a file is similar, using File along with classes like FileReader or BufferedReader to read…

    • Buffered Streams

      Buffered streams in Kotlin enhance the efficiency of reading from and writing to data sources. Instead of directly interacting with the underlying input or output stream for every read or write operation, buffered streams use an internal buffer. This buffer temporarily stores data, reducing the number of actual I/O…

    • Gradle

      Gradle is an open-source build automation tool known for its flexibility and performance. It's used to automate tasks like compiling, testing, and deploying software. Gradle uses a Domain Specific Language (DSL) based on Groovy or Kotlin to define build scripts, allowing developers to customize the build process…

    • Maven

      Maven is a powerful build automation tool primarily used for Java projects, but it also works seamlessly with Kotlin. It simplifies dependency management by allowing you to declare external libraries your project needs, and Maven automatically downloads and includes them. Maven uses a Project Object Model (POM)…

    • Build Tool API

      The Build Tool API in Kotlin provides a way for build tools like Gradle or Maven to interact with the Kotlin compiler and related tooling. It allows these tools to configure the compilation process, access compiler options, and integrate Kotlin code into the overall build lifecycle. This API enables build tools to…

  42. Stage 42: IDEs

    • IDEs

      Integrated Development Environments (IDEs) provide developers with tools to write, test, and debug code more efficiently. Popular IDEs for Kotlin development include IntelliJ IDEA, which is developed by JetBrains (the creators of Kotlin) and offers excellent support for the language, including code completion,…

    • IntelliJ IDEA

      IntelliJ IDEA is a popular Integrated Development Environment (IDE) specifically designed for software development. It provides a comprehensive suite of tools for coding, debugging, testing, and deploying applications. It offers features like code completion, refactoring, and integration with version control…

    • Android Studio

      Android Studio is the official Integrated Development Environment (IDE) for Android app development, built on JetBrains' IntelliJ IDEA. It provides a comprehensive suite of tools for designing, developing, debugging, and testing Android applications. It includes features like a visual layout editor, code…

    • Kotline Notebook

      Kotlin Notebook is an interactive environment for writing and executing Kotlin code, similar to Jupyter Notebook for Python. It allows you to combine code, text, and visualizations in a single document, making it ideal for data exploration, prototyping, and creating interactive tutorials. You can execute code…

  43. Stage 43: Kotlin Multiplatform

    • Kotlin Multiplatform

      Kotlin Multiplatform (KMP) is a feature of the Kotlin programming language that allows developers to write code that can be shared across multiple platforms, such as Android, iOS, JVM, JavaScript, and Native. This means you can write common business logic, data models, and algorithms once in Kotlin and then reuse…

    • Compose Multiplatform

      Compose Multiplatform is a declarative UI framework that allows developers to share user interface code across multiple platforms, including Android, iOS, desktop (Windows, macOS, Linux), and web. It's based on Jetpack Compose, Google's modern UI toolkit for Android, and leverages Kotlin's multiplatform…

  44. Stage 44: Kotlin/Java

    • Kotlin/Java

      Kotlin/Java allows Kotlin code to seamlessly interact with Java code and libraries. This interoperability means you can use existing Java code in your Kotlin projects and vice versa. It leverages the Java Virtual Machine (JVM) to run both Kotlin and Java code, enabling developers to gradually migrate Java projects…

    • Java from Kotlin

      Kotlin is designed to be fully interoperable with Java, meaning you can seamlessly use existing Java code within your Kotlin projects. This allows you to leverage existing Java libraries, frameworks, and codebases without needing to rewrite them in Kotlin. You can call Java code directly from Kotlin, accessing…

    • Kotlin from Java

      Kotlin from Java refers to the process of using Kotlin code within existing Java projects. It allows developers to gradually introduce Kotlin into their codebase without requiring a complete rewrite. This interoperability enables leveraging the benefits of Kotlin, such as its concise syntax and null safety…

    • Spring Boot

      Spring Boot simplifies building Java applications by providing auto-configuration and a streamlined setup process. When used with Kotlin, it allows developers to leverage Kotlin's concise syntax, null safety, and modern features within the familiar Spring ecosystem. This combination enables the creation of robust…

  45. Stage 45: Kotlin/Native

    • Kotlin/Native

      Kotlin/Native is a technology for compiling Kotlin code to native binaries, which can run without a virtual machine. This allows Kotlin to be used for developing applications for platforms where a JVM is not suitable or available, such as embedded systems, iOS, macOS, Windows, Linux, and WebAssembly. It achieves…

    • C Interoperability

      C Interoperability in Kotlin/Native allows Kotlin code to interact with C libraries and code. This means you can use existing C libraries within your Kotlin/Native projects, and also expose Kotlin/Native code to be used from C. It involves mapping C data types and functions to their Kotlin equivalents, enabling…

    • Swift/Objective-C Interop.

      Kotlin/Native allows you to use Swift and Objective-C code directly in your Kotlin projects, and vice versa. This means you can leverage existing iOS libraries and frameworks within your Kotlin/Native code, and also expose Kotlin code to be used in Swift/Objective-C projects. This interoperability is achieved…

  46. Stage 46: Kotlin/WASM

    • Kotlin/WASM

      Kotlin/WASM allows you to compile Kotlin code to WebAssembly (WASM), a binary instruction format designed for efficient execution in web browsers and other environments. This enables Kotlin developers to build high-performance applications that can run directly in the browser, leveraging Kotlin's features and…

  47. Stage 47: Kotlin/JavaScript

    • Kotlin/JavaScript

      Kotlin/JavaScript (Kotlin/JS) allows you to compile Kotlin code into JavaScript. This enables you to use Kotlin to develop web applications, Node.js applications, and other JavaScript-based projects. The resulting JavaScript code can then be executed in any environment that supports JavaScript, such as web browsers…

  48. Stage 48: Kotlin Scripting

    • Kotlin Scripting

      Kotlin Scripting allows you to use Kotlin as a scripting language. This means you can write Kotlin code that can be executed directly, without the need for a full-fledged application setup. It's useful for automating tasks, creating build scripts, or embedding custom logic into applications.

  49. Stage 49: Server-side Apps

    • Server-side Apps

      Kotlin is a great fit for developing server-side applications. It allows you to write concise and expressive code while maintaining full compatibility with existing Java-based technology stacks, all with a smooth learning curve:

    • Ktor

      Ktor is a framework for building asynchronous server-side applications, client applications, and more, in connected systems. It's built using Kotlin and coroutines, providing a simple and efficient way to handle concurrency and build scalable network applications. Ktor allows developers to create web applications,…

    • Spring

      Spring is a popular, open-source application framework for building robust and scalable Java applications. It provides a comprehensive infrastructure support for developing enterprise applications, handling concerns like dependency injection, aspect-oriented programming, data access, and transaction management.…

    • Quarkus

      Quarkus provides first class support for using Kotlin. The framework is open source and maintained by Red Hat. Quarkus was built from the ground up for Kubernetes and provides a cohesive full-stack framework by leveraging a growing list of hundreds of best-of-breed libraries.

    • Vert.x

      Vert.x is a toolkit for building reactive applications on the JVM. It provides a non-blocking, event-driven concurrency model, making it well-suited for building scalable and high-performance server-side applications. With Vert.x, you can handle a large number of concurrent connections using a small number of…

  50. Stage 50: Data Analysis

    • Data Analysis

      Data analysis involves examining raw data to draw conclusions about that information. Kotlin, primarily known for Android development, can also be used for data analysis. With Kotlin's Exploratory Data Analysis (EDA) tools, such as Kotlin notebooks, Kotlin DataFrame, and Kandy, you have at your disposal a rich set…

    • Android Jetpack

      Android Jetpack is a suite of libraries, tools, and architectural guidance designed to help developers build robust, testable, and maintainable Android applications more easily. It addresses common Android development challenges by providing pre-built components for tasks like managing UI, data persistence,…

    • Android Studio

      Android Studio is the official Integrated Development Environment (IDE) for Android app development, and it fully supports Kotlin. It provides tools for coding, debugging, testing, and designing user interfaces for Android applications. With features like code completion, refactoring, and a visual layout editor,…

    • Android SDK

      The Android SDK (Software Development Kit) is a set of tools, libraries, documentation, and sample code provided by Google that allows developers to create applications for the Android operating system. It provides the necessary APIs and development environment to build, test, and debug Android apps. The SDK…

    • Kotlin Notebooks

      Kotlin Notebooks provide an interactive environment for writing and executing Kotlin code, often within a web browser. They allow you to combine code, text, and visualizations in a single document, making them ideal for exploring data, prototyping ideas, and creating shareable reports. This interactive approach…

    • Kotlin DataFrame

      Kotlin DataFrame is a library designed for in-memory data manipulation and analysis. It provides a tabular data structure, similar to data frames in R or Python's Pandas, allowing you to organize data into columns of different types. This library offers functionalities for filtering, transforming, aggregating, and…

    • Kandy

      Kandy is a Kotlin library designed for creating visualizations and performing data analysis. It provides a concise and expressive API for generating plots and charts directly from Kotlin code. Kandy simplifies the process of exploring and presenting data insights, allowing developers to create visually appealing…

  51. Stage 51: Competitive Programming

    • Competitive Programming

      Kotlin can be used for competitive programming due to its concise syntax, standard library, and interoperability with Java. It allows programmers to write efficient and readable code, which is crucial for solving algorithmic problems quickly. Kotlin's features like data classes, extension functions, and null safety…

  52. Stage 52: AI Development

    • AI Development

      Kotlin provides a modern and pragmatic foundation for building AI-powered applications. It can be used across platforms, integrates well with established AI frameworks, and supports common AI development patterns through its AI agentic framework, Koog. There are many use cases where Kotlin can help with AI…

    • Koog

      Koog is a Kotlin library designed to simplify the development of AI applications. It provides tools and abstractions for tasks such as neural network creation, training, and inference. Koog aims to make AI development more accessible and efficient within the Kotlin ecosystem by offering a high-level API and…

Questions about the Kotlin Roadmap

Is the Kotlin Roadmap free?

Yes. All 153 lessons in this roadmap are free to read on Bibha AI Learning Labs, with no account and no payment. Signing in is optional: it lets you mark lessons as done and keep your progress, and it opens the AI tutor, which runs on your own API key.

How long does the Kotlin Roadmap take?

There is no fixed duration. It has 153 lessons in 52 stages, and the time it takes depends on how many hours you give it each week. Nothing is locked, so you can skip what you already know, and your progress is saved once you sign in.

Where should I start the Kotlin Roadmap?

Start with stage 1, Introduction to Kotlin, and work down in order. The stages are numbered in the order the roadmap suggests, but every lesson is open, so if you already know Introduction to Kotlin you can go straight to Code Organization or anything after it. Each lesson links to free resources for going deeper.

Can I learn Kotlin in Hindi?

The lessons are written in English. Once you sign in, you can ask the AI tutor on any lesson to explain it in Hindi or Hinglish. It answers from that lesson’s own text, so the explanation stays on the syllabus. The tutor runs on your own Google, OpenAI or Anthropic key.

Still confused? Ask me