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 Basics (19)
- Kotlin Collections (17)
- Testing (14)
- Kotlin Classes and Objects (14)
- Kotlin (11)
- Kotlin Strings (10)
- Spring (9)
- Kotlin-Java Interop (9)
- Libraries (8)
- Kotlin Concurrency (7)
- Asynchronous Programming (7)
- Kotlin Arrays (6)
- Series (5)
- Kotlin Functions (5)
- Kotlin Server-Side (4)
- Kotlin IO (4)
- Patterns (3)
- Kotlin Web (3)
- Kotlin Numbers (3)
- HTTP Client-Side (3)
- Functional Programming (3)
- Persistence (2)
- Algorithms (2)
- Security (1)
- Kotlin Dates (1)
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.
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.
Removing the First Element From an Array in Kotlin
Filed under Kotlin Arrays
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().