Learn about the differences between let and if-not-null when handling operations on nullable objects in Kotlin.
Also find me here:
Baeldung Author
baeldung
This is the standard author on the site. Most articles are published by individual authors, with their own profiles, but when multiple people have a strong contribution, we publish collectively here.
Here's what I've written (so far):
Baeldung on Kotlin
- All
- Kotlin Collections (32)
- Kotlin Basics (22)
- Kotlin Classes and Objects (18)
- Testing (14)
- Kotlin Strings (14)
- Spring (12)
- Kotlin-Java Interop (11)
- Kotlin (11)
- Libraries (9)
- Asynchronous Programming (8)
- Kotlin Concurrency (7)
- Kotlin Server-Side (6)
- Kotlin Functions (6)
- Patterns (5)
- Kotlin Numbers (5)
- Kotlin IO (5)
- HTTP Client-Side (3)
- Functional Programming (3)
- Algorithms (3)
- Series (2)
- Persistence (2)
- Kotlin Web (2)
- Kotlin Dates (2)
- Security (1)
Implement a MultiMap in Kotlin
Filed under Kotlin Collections
Lear about MultiMap, a Map implementation that doesn’t exist in Kotlin stdlib but is provided by the libraries such as Guava, Spring, and Apache.
Print Lists Content Separated By Comma
Filed under Kotlin Collections
Explore different techniques to print a List’s elements separated by a comma in Kotlin.
An Introduction to Running GraphQL in Kotlin and Ktor
Filed under Kotlin Server-Side, Kotlin Web
Learn how to write a GraphQL API client and server in Kotlin.
CRUD API With Spring Boot And Kotlin
Filed under Kotlin, Kotlin Server-Side
This tutorial demonstrates building a CRUD API with Spring Boot and Kotlin for a task list.
Split a String Into Chunks of a Given Size in Kotlin
Filed under Kotlin Strings
Explore how to split a string into chunks of a specific size in Kotlin.
Get the Line Number Where an Exception Was Thrown in Kotlin
Filed under Kotlin Basics
Explore strategies for extracting the line number and other metadata from where an exception was thrown in Kotlin.
Creating a Spring Boot Console Application With Kotlin
Filed under Spring
In this tutorial, we learn how to create a Spring Boot console application in Kotlin.
Removing the First Element From an Array in Kotlin
Filed under Kotlin Collections
Explore several strategies for removing the first element from an array in Kotlin.
Removing the First Element From an ArrayList in Kotlin
Filed under Kotlin Collections
Learn several strategies for removing the first element from an ArrayList in Kotlin.
Generate Multiplication Table in Kotlin
Filed under Kotlin
Learn how to generate a multiplication table in Kotlin.
Clone a Set in Kotlin
Filed under Kotlin Collections
Explore several strategies for cloning Sets in Kotlin.
Converting a Custom Object List to Simple List in Kotlin
Filed under Kotlin Basics, Kotlin Collections
This article demonstrates how to convert a list of objects into a list of strings in Kotlin using various methods, including map(), mapNotNull(), mapTo(), mapIndexed(), for loops, and flatMap().
Find the Index of an Element in a Kotlin Array
Filed under Kotlin Collections
Explore several ways to find the index of an element in a Kotlin array.
Working With Pair in Kotlin
Filed under Kotlin Collections
Learn how the Pair class works in Kotlin.
Kotlin TODO() Function
Filed under Kotlin Basics
Discover how to use the Kotlin TODO() function to mark code that is not yet implemented.
Find the Factorial of a Given Number in Kotlin
Filed under Algorithms
Learn several techniques for computing the factorial of an integer in Kotlin.
Data-Driven Testing With Kotest
Filed under Testing
Learn several strategies for data-driven testing with Kotest.
How to Build CLI Applications Using Kotlinx-Cli
Filed under Libraries
A quick and practical guide to building CLI applications using kotlinx-cli.
JUnit 5 vs. Kotest: A Comparison for Unit Testing
Filed under Testing
Explore the differences between Kotest and JUnit 5, along with when to use each technology.
How to Use MockServer in a Kotest Test
Filed under Testing
Learn how to use MockServer in Kotest to verify requests and responses.
How to Run a Function Before Every Test Using Kotest
Filed under Testing
Learn to efficiently test Kotlin applications with Kotest’s lifecycle hooks for running functions before tests.
How to Write a Spring Boot Test Using Kotest
Filed under Testing
Learn how to use Kotest for writing Spring Boot tests in Kotlin.
How to Run Testcontainers Inside a Kotest Test
Filed under Testing
Discover how to use Testcontainers with the Kotest testing framework for Kotlin.
How to Assert the Type of an Object in Kotest
Filed under Testing
Learn several ways to use Kotest to assert that Kotlin objects are of the expected class or subclass.
Adding New SourceSet with Gradle Kotlin DSL
Filed under Kotlin
Discover how to add source sets to Gradle builds with the Kotlin DSL, along with tips for using these source sets in your projects.
Convert Between Int and Char in Kotlin
Filed under Kotlin Numbers
Learn several strategies for converting between Ints and Chars in Kotlin.
A Guide to detekt: Static Code Analysis for Kotlin
Filed under Kotlin
Learn how to use detekt for Kotlin-specific static code analysis, including some configuration tips for effective use.
Difference Between Object and Data Class in Kotlin
Filed under Kotlin Classes and Objects
Learn about data class and objects in practice and the differences between them.
How to Run Parallel Coroutines in Kotlin
Filed under Kotlin Concurrency
Learn several strategies for running coroutines in parallel in Kotlin.
Mapping java.util.Optional to T in Kotlin
Filed under Kotlin-Java Interop
Learn how to unwrap java.util.Optional in Kotlin, along with additional strategies for approaching nullability in Kotlin.
Creating a List of Objects in Kotlin
Filed under Kotlin Collections
Explore three common methods for creating lists of objects in Kotlin.
Mutating Arrays in Kotlin
Filed under Kotlin Collections
Learn some strategies for mutating arrays in place and the tradeoffs from a purely functional approach.
Spring Integration With Kotlin
Filed under Kotlin Server-Side, Spring
Learn about the Spring Integration Kotlin DSL and explore its basic features.
Variable with Public Getter and Private Setter in Kotlin
Filed under Kotlin Basics
A quick and practical guide to creating variables with public getters and private setters in Kotlin.
Kotlin Generic Inline Classes
Filed under Kotlin Basics
Explore the generic inline class in Kotlin and learn some powerful ways to use it.
Kotlin Coroutines With Timeout
Filed under Kotlin Concurrency
Learn several strategies to manage timeouts in a Kotlin coroutine.
Spring Dependency Injection With Kotlin
Filed under Spring
This article discusses Spring dependency injection options available with Kotlin, including Spring’s @Autowired annotation for injecting components. The article provides examples of each option and concludes by emphasizing the importance of proper dependency injection in Kotlin.
Difference Between Collection and Sequence in Kotlin
Filed under Kotlin Collections
Explore some key differences between Collections and Sequences in Kotlin.
Kotlin Arrow Operator
Filed under Kotlin Basics
Learn about Kotlin’s arrow operator and how to use it in various syntax constructs.
How to Encode a String in UTF-8 in Kotlin
Filed under Kotlin Strings
A quick and practical guide to encoding a UTF8 String in Kotlin.
Kotlin Path API
Filed under Kotlin IO
A quick and practical guide to Kotlin Path API.
Difference Between runCatching and try / finally in Kotlin
Filed under Kotlin Basics
Explore the differences between using runCatching and a try / finally expression in Kotlin. Then, find out when to prefer each.
Getting Started With Kotlin/Native
Filed under Kotlin
Discover the basics of Kotlin/Native including how to set a project up and interop with other native libraries.
“Accidental override” Error in Kotlin
Filed under Kotlin-Java Interop
Learn about the accidental override error in Kotlin and how to fix situations where code has conflicting JVM signatures.
Kotlin Elvis Operator
Filed under Kotlin Basics
Learn about Kotlin’s Elvis operator which can help to avoid null references.
Difference Between Flows and Channels in Kotlin
Filed under Kotlin Concurrency
Flows and channels allow Kotlin to process data. Here, we look at the differences between them.
What Is an “inappropriate blocking method call” in Kotlin
Filed under Kotlin
A quick and practical guide to “inappropriate blocking method call” problem in Kotlin.
Mockk – Check If a Method Was Not Invoked
Filed under Testing
A quick and practical guide to asserting if a method was not invoked with Mockk.
Mock Static Java Methods Using Mockk
Filed under Testing
A quick and practical guide to mocking static methods with Mockk.
Why We Should Avoid Using Open Members in Kotlin Constructors
Filed under Kotlin Classes and Objects
Using open members in constructors in Kotlin is possible but may lead to unexpected results. We look at how they work and how to avoid using them.
Difference Between Two Dates in Kotlin
Filed under Kotlin Dates
A quick example of how to calculate the difference between two dates using Java 8 built-in classes and Joda time.
Difference Between Coroutine Scope and Coroutine Context
Filed under Asynchronous Programming
A quick and practical guide to the differences between coroutine scope and coroutine context.
Difference Between “open” and “public” Keywords in Kotlin
Filed under Kotlin Basics, Kotlin Classes and Objects
Understand the differences between using the “open” and “public” keywords in Kotlin.
Explicit API Mode in Kotlin
Filed under Kotlin
Learn about the explicit API mode in Kotlin and how it can help us keep our public APIs less error-prone.
Kotlin and Spring Boot @ConfigurationProperties
Filed under Spring
Explore different ways of using Spring @ConfigurationProperties with Kotlin classes.
Create a Deep Copy of a Kotlin Data Class
Filed under Kotlin Classes and Objects
Learn how to make deep copies of Kotlin objects.
Taking the First N Elements of an Array in Kotlin
Filed under Kotlin Collections
Learn how to take items from the beginning of arrays in Kotlin.
Get the Current Date/Time in Kotlin
Filed under Kotlin Dates
Discover ways to get the current date and time in Kotlin.
Check if a Number Is Odd or Even in Kotlin
Filed under Kotlin Numbers
Learn about using the rem() operator to determine if numbers are even or odd in Kotlin.
Best Practices for Using Constants in Kotlin
Filed under Kotlin Basics
Discover strategies for using constants effectively in Kotlin.
Count Number of Digits With Kotlin
Filed under Kotlin Numbers
Learn multiple approaches to counting the number of digits in a number or string with Kotlin.
Sort Collection of Objects by Multiple Fields in Kotlin
Filed under Kotlin Collections
Discover several strategies for sorting collections by multiple fields.
Package-Private Alternative in Kotlin
Filed under Kotlin-Java Interop
Explore alternatives to Java’s package private in Kotlin.
Convert a Kotlin Data Class Object to a Map
Filed under Kotlin Collections, Libraries
While a data class may be a useful strongly typed way to store date, we may wish to convert our data objects into a more dynamic structure, such as a Map. We look at a few solutions for converting between data classes and maps.
Kotlin Data Class With Optional Fields
Filed under Kotlin Classes and Objects
Learn how to create a class instance with optional fields
Error Handling for REST with Spring in Kotlin
Filed under Spring
A quick and practical guide to Spring error handling in Kotlin.
Remove a Character From a String in Kotlin
Filed under Kotlin Strings
When we need to remove characters from strings in Kotlin, there are a few extension functions we can use to help us. We look at the most common ways to produce a new string with a character removed.
Calling a Kotlin Function After a Delay
Filed under Kotlin Concurrency
Learn how to call a function with delay in Kotlin using a scheduler, thread, and coroutine
Count Occurrences of a Character in a String in Kotlin
Filed under Kotlin Strings
Learn various methods of counting occurrences of a specific character in a String
Break or Continue a Functional Loop in Kotlin
Filed under Kotlin Basics
A quick and practical guide to breaking/continuing a functional loop in Kotlin.
Kotlin Platform Types
Filed under Kotlin-Java Interop
Learn about platform types in Kotlin how to handle the nullability
Kotlin Collections Guide
Filed under Kotlin Collections, Series
A series of tutorials on working with collections in Kotlin.
Check if a String Contains a Substring in Kotlin
Filed under Kotlin Strings
A quick and practical guide to checking if a String contains a substring.
Run Kotlin Class From the Command Line
Filed under Kotlin Basics
Learn how to compile a Kotlin class and how to run the class from the command line
Convert a Character Array to a String in Kotlin
Filed under Kotlin Strings
A quick and practical character array to string Kotlin conversion guide.
Get Character by Index in a Kotlin String
Filed under Kotlin Strings
Learn several ways to get a character from a Kotlin String by index.
Kotlin Technical Editor (remote, part-time)
Filed under Kotlin
Join the Kotlin editorial team
Convert List to String in Kotlin
Filed under Kotlin Collections, Kotlin Strings
Learn several ways to convert Lists to Strings using only core Kotlin and the Collections API.
Converting Strings to Date in Kotlin
Filed under Kotlin Strings
A quick and practical guide to converting Strings to Dates in Kotlin.
Check if a String Is Numeric in Kotlin
Filed under Kotlin Strings
A quick and practical guide to checking if String is numeric in Kotlin.
Introduction to Kotest
Filed under Testing
Explore several basic functionalities provided by the Kotest framework.
Initialize a Map in Kotlin
Filed under Kotlin Collections
A quick and practical guide to initializing a Map in Kotlin.
Composing Coroutines and Suspend Functions
Filed under Asynchronous Programming
Learn how to work with coroutines in Kotlin and how to compose them together.
Access Kotlin Companion Object in Java
Filed under Kotlin-Java Interop
A quick and practical guide to accessing Kotlin’s companion objects from Java.
Initialize a List in Kotlin
Filed under Kotlin Collections
A quick and practical guide to initializing a List in Kotlin.
Kotlin DSL for Gradle
Filed under Kotlin
Learn how to write Gradle scripts in Kotlin
Iterate Over a Map in Kotlin
Filed under Kotlin Collections
There are a few ways to iterate over the keys and values in a Kotlin map. We look at some of the options and which is more efficient at runtime.
Building a Self-Executable Jar With Gradle and Kotlin
Filed under Kotlin Server-Side
A quick and practical guide to building a self-executable Jar with Gradle and Kotlin.
Abstract Factory Pattern in Kotlin
Filed under Patterns
Learn about the abstract factory pattern in Kotlin.
Interfaces as Method Parameters and Higher Order Functions in Kotlin
Filed under Kotlin Functions
Learn how we can create functions that take functions as arguments and return them as results.
Using Bitwise Operators in Kotlin
Filed under Kotlin Basics
A quick and practical guide to using bitwise operations in Kotlin.
Rounding Numbers in Kotlin
Filed under Kotlin Numbers
Learn multiple ways to perform rounding of numbers in Kotlin.
Parsing JSON Arrays in Kotlin with Gson
Filed under HTTP Client-Side, Kotlin Collections
Learn how to serialize and deserialize JSON arrays with Kotlin using Gson
Sealed Class vs Enum in Kotlin
Filed under Kotlin Classes and Objects
Learn the differences between sealed classes and enums in Kotlin.
Modifying Kotlin Lists In-Place
Filed under Kotlin Collections
Learn several ways to efficiently update Kotlin lists in place.
Iterate Through a JSONArray in Kotlin
Filed under Kotlin Collections
Learn how to iterate over a JSONArray in Kotlin.
Log Request/Response Body in Spring WebFlux with Kotlin
Filed under Spring
Learn how to log request and response bodies of a Spring Webflux application in Kotlin using a custom WebFilter.
Introduction to “this” Keyword in Kotlin
Filed under Kotlin Classes and Objects
A quick and practical introduction to the “this” keyword in Kotlin.
Kotlin – Getting Started with IntelliJ
Filed under Kotlin Basics
Learn how to use Kotlin in IntelliJ IDEA.
The Decorator Pattern in Kotlin
Filed under Patterns
A quick and practical guide to the Decorator design pattern in Kotlin.
Combining Two Arrays in Kotlin
Filed under Kotlin Collections
Explore the most common ways to merge arrays in Kotlin.
Get a Random Item From a List in Kotlin
Filed under Kotlin Collections
A quick and practical guide to taking random items from collections in Kotlin.
Introduction to TornadoFX
Filed under Libraries
Learn how to set up and use TornadoFX with Kotlin.
Kotlin Coroutines: Waiting for Multiple Threads to Finish
Filed under Kotlin Concurrency
Learn about structured concurrency through examples of how to use async or launch for concurrent executions of coroutines
Coroutine Context and Dispatchers
Filed under Asynchronous Programming
Learn about the CoroutineContext and then continue with dispatchers as one of the important elements of the CoroutineContext
Working With Maps in Kotlin
Filed under Kotlin Collections
In this tutorial, we’ll look at the Map collection type in Kotlin.
Getters and Setters in Kotlin
Filed under Kotlin Classes and Objects
Learn about getters and setters for properties in Kotlin.
Lazy Initialization in Kotlin
Filed under Kotlin Basics
See how you can achieve lazy initialization in Kotlin.
Get a Random Number in Kotlin
Filed under Kotlin Numbers
Learn different ways for creating a random number in Kotlin.
Kotlin withContext() vs. async-await
Filed under Asynchronous Programming
Learn about Kotlin’s async and withContext and when to use each method
Kotlin Loops
Filed under Kotlin Basics
Explore various loops supported by Kotlin.
Introduction to Channels in Kotlin
Filed under Kotlin Concurrency
A quick and practical introduction to channels in Kotlin.
Quick Guide to Kotlin Default and Named Arguments
Filed under Kotlin Functions
We can avoid providing long lists of inputs, or defining multiple overloads of a function, by using a combination of named parameters and defaults.
The Observer Pattern in Kotlin
Filed under Patterns
Learn several ways how to implement the observer pattern in Kotlin.
Spring Security with Kotlin DSL
Filed under Security
Learn how to configure Spring Security applications using Kotlin’s DSL.
Difference Between fold and reduce in Kotlin
Filed under Kotlin Collections
Explore the differences between fold() and reduce().
Kotlin Reactive Microservice With Spring Boot
Filed under Kotlin Server-Side, Spring
Learn how to create a microservice application with Kotlin and Spring Boot.
Finding an Element in a List Using Kotlin
Filed under Kotlin Collections
Learn how to use Kotlin with lists to find and filter elements on it.
Java EE Application with Kotlin
Filed under Kotlin Server-Side
Learn how to build CRUD REST JPA application in Kotlin, how to deploy it, how to run it in the Java EE container and how to test it with Arquillian.
MockMvc Kotlin DSL
Filed under Testing
Have a look at the new Kotlin-specific MockMvc support available in Spring
Non-Blocking Spring Boot with Kotlin Coroutines
Filed under Asynchronous Programming, Spring
Find out how to write clean reactive code with Spring Boot and Kotlin co-routines, which make asynchronous code look as straightfoward as synchronous.
Converting a Kotlin File to Java
Filed under Kotlin-Java Interop
Learn how to convert a Kotlin file to Java using the Fernflower tool from the command line or within IntelliJ IDEA.
Jackson Support for Kotlin
Filed under Libraries
Have a look at Jackson’s support for serializing and deserializing JSON with Kotlin
Console I/O in Kotlin
Filed under Kotlin IO
Learn how to handle I/O in Kotlin using its standard library or one of several classes from the Java standard library.
InputStream to String in Kotlin
Filed under Kotlin IO, Kotlin Strings
Learn various ways to read a Kotlin InputStream into a String
MockK: A Mocking Library for Kotlin
Filed under Testing
Learn about the basic features of the MockK Kotlin library
Kotlin Scope Functions
Filed under Kotlin Functions
Explore Kotlin scope functions and their use cases.
Split a List into Parts in Kotlin
Filed under Kotlin Collections
Learn several methods for splitting up a list of items into parts in Kotlin.
Delegation Pattern in Kotlin
Filed under Patterns
Learn about Kotlin’s native support for the delegation pattern
String Comparison in Kotlin
Filed under Kotlin Strings
Learn different ways to compare Strings in Kotlin
Static Methods Behavior in Kotlin
Filed under Kotlin Basics
Learn a few ways to achieve Java’s static method behavior in Kotlin.
Building DSLs in Kotlin
Filed under Kotlin
Learn how to build type-safe DSLs in Kotlin.
Nested forEach in Kotlin
Filed under Kotlin Basics
Learn how to use the default parameter it in Kotlin and how to access the parameters of an outer forEach from within a nested forEach loop.
Inline Classes in Kotlin
Filed under Kotlin Classes and Objects
Learn how to use inline classes in Kotlin.
Kotlin Contracts
Filed under Kotlin Functions
Learn how to use the contracts feature in Kotlin to alleviate compiler errors.
Introduction to Arrow in Kotlin
Filed under Functional Programming, Libraries
Learn about using the Arrow library in Kotlin
Guide to Sorting in Kotlin
Filed under Algorithms
A brief guide to sorting using Kotlin standard library.
Initializing Arrays in Kotlin
Filed under Kotlin Collections
A quick look at initializing arrays in Kotlin.
Threads vs Coroutines in Kotlin
Filed under Asynchronous Programming, Kotlin Concurrency
A focused tutorial about multithreading in Kotlin using Threads and Coroutines.
Concatenate Strings in Kotlin
Filed under Kotlin Strings
Learn about different ways to concatenate strings in Kotlin
Fuel HTTP Library with Kotlin
Filed under HTTP Client-Side, Libraries
A tutorial on a popular HTTP Kotlin library and its modules
Kotlin Nested and Inner Classes
Filed under Kotlin Classes and Objects
Understand better how nested and inner classes work in Kotlin
Kotlin Constructors
Filed under Kotlin Classes and Objects
A guide to defining and using constructors in Kotlin
Creational Design Patterns in Kotlin: Builder
Filed under Patterns
In this quick article, we’ll see how to implement the Builder Design Pattern in Kotlin.
Spring Webflux with Kotlin
Filed under Spring
Take a look at a Spring Webflux example using Kotlin
Create a Java and Kotlin Project with Maven
Filed under Kotlin-Java Interop
Learn how to configure a Java+Kotlin project with Maven.
Kotlin with Ktor
Filed under Asynchronous Programming, Libraries
Learn how to use the Ktor framework for Kotlin to create a REST API.
Kotlin String Templates
Filed under Kotlin Strings
Explore Kotlin’s String templates and learn how to use them.
Working with Enums in Kotlin
Filed under Kotlin Classes and Objects
An overview of some basic and advanced enum constructs in Kotlin
Processing JSON with Kotlin and Klaxson
Filed under Libraries
Learn how to work with JSON in Kotlin using the Klaxson library.
Kotlin and Javascript
Filed under Kotlin Web
Learn how to create a node.js application with Kotlin
On Kotlin
Filed under Series
Get started learning Kotlin with practical examples.
Lambda Expressions in Kotlin
Filed under Functional Programming
A quick and practical guide to Lambda Expressions in Kotlin.
Writing to a File in Kotlin
Filed under Kotlin IO
A quick guide to writing into files using Kotlin.
Reactive Flow with MongoDB, Kotlin, and Spring WebFlux
Filed under Persistence, Spring
A quick example showcasing how we can save data to MongoDB and send browser updates reactively using SSE.
Filtering Kotlin Collections
Filed under Kotlin Collections
A quick and practical reference for filtering Kotlin collections.
Reading from a File in Kotlin
Filed under Kotlin IO
Learn how to read file contents in Kotlin
Objects in Kotlin
Filed under Kotlin Classes and Objects
Learn what objects are in Kotlin and how they can make your code cleaner and easier to develop and maintain.
Working with Kotlin and JPA
Filed under Persistence
Learn how you can use JPA in your Kotlin project.
The @JvmSynthetic Annotation in Kotlin
Filed under Kotlin-Java Interop
Learn how to generate synthetic elements in the bytecode of your Kotlin application using the @JvmSynthetic annotation.
Kotlin Dependency Injection with Kodein
Filed under Libraries
Learn how to use the Kodein dependency injection framework for Kotlin.
Infix Functions in Kotlin
Filed under Kotlin Functions
Make your Kotlin code easier to read through the use of infix functions.
HTTP Requests with Kotlin and khttp
Filed under HTTP Client-Side
Learn how to work with HTTP requests in Kotlin using khttp.
Try-with-resources in Kotlin
Filed under Kotlin Basics
Learn how Kotlin is managing resources automatically and how it differs from Java’s try-with-resources construct.
Extension Functions in Kotlin
Filed under Kotlin Functions
A quick guide to using and creating extension methods in Kotlin.
JUnit 5 for Kotlin Developers
Filed under Testing
Learn how to write JUnit 5 tests in the Kotlin language.
Migrating from Java to Kotlin
Filed under Kotlin-Java Interop
Get a quick overview of the first steps needed to migrate from Java to Kotlin.
Kotlin-allopen and Spring
Filed under Spring
A quick and practical example of using the kotlin-allopen plugin.
Spring MVC Setup with Kotlin
Filed under Spring
Learn how to create a simple Spring MVC project with the Kotlin language.
Java 8 Stream API Analogies in Kotlin
Filed under Kotlin-Java Interop
See the differences and similarities between Java 8 Stream API and Kotlin Collections.
Kotlin and Tail Recursion
Filed under Algorithms
See how to utilize the Tail Call Optimization in Kotlin.
Sealed Classes in Kotlin
Filed under Kotlin Classes and Objects
A quick and practical example of using Sealed Classes in Kotlin.
Delegated Properties in Kotlin
Filed under Kotlin Classes and Objects
A quick and practical example of using delegated properties in Kotlin.
Visibility Modifiers in Kotlin
Filed under Kotlin Classes and Objects
Discover Kotlin’s visibility modifiers and see how they differ from those found in Java.
Destructuring Declarations in Kotlin
Filed under Kotlin Classes and Objects
A quick and practical example of using destructuring declarations in Kotlin.
Kotlin with Mockito
Filed under Testing
Learn how to use Mockito and Kotlin together in order to create mocks and write effective unit tests.
Overview of Kotlin Collections API
Filed under Kotlin Collections
A quick and practical overview of the Kotlin Collections API.
Converting a List to Map in Kotlin
Filed under Kotlin Collections
Learn how to convert a List to Map in Kotlin.
Introduction to Kotlin Coroutines
Filed under Asynchronous Programming
Learn how to create asynchronous programs with Kotlin coroutines.
Difference Between “==” and “===” Operators in Kotlin
Filed under Kotlin Basics
Learn the difference between ‘==’ and ‘===’ Kotlin operators.
Generics in Kotlin
Filed under Kotlin Classes and Objects
A quick and practical guide to generics in Kotlin.
Kotlin Java Interoperability
Filed under Kotlin-Java Interop
Quick and practical examples of Java-Kotlin interoperability.
Comprehensive Guide to Null Safety in Kotlin
Filed under Kotlin
A quick, practical guide to the null safety features built into the Kotlin programming language.
Guide to the “when{}” Block in Kotlin
Filed under Kotlin Basics
A quick and practical guide to the “when{}” block in Kotlin.
Introduction to the Kotlin Language
Filed under Kotlin Basics
A brief overview of Kotlin’s main characteristics and features.