Learn how to take items from the beginning of arrays 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)
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.
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
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