Concatenate Strings in Kotlin 1. Introduction In this short tutorial, we’ll investigate different ways of concatenating strings in Kotlin. 2. Using the plus() Method Kotlin’s String class contains a plus() method: operator fun plus(other: Any?): String (source) It returns a String obtained by concatenating reference String with the String passed as… Continue Reading kotlin-concatenate-strings

Difference Between “==” and “===” operators in Kotlin 1. Overview In this article, we are going to talk about the difference between “==” and “===” operators in Kotlin. In Kotlin, just like in Java, we have two different concepts of equality, Referential equality, and Structural equality. 2. Referential Equality For… Continue Reading kotlin-equality-operators

Kotlin Java Interoperability 1. Overview In this tutorial, we’re going to discuss the interoperability between Java and Kotlin. We’re going to cover some basic examples as well as some other more complex scenarios. 2. Setting up Kotlin Creating a Kotlin project is very simple using IntelliJ, Eclipse, and even the… Continue Reading kotlin-java-interoperability

Java 8 Stream API Analogies in Kotlin 1. Introduction Java 8 introduced the concept of Streams to the collection hierarchy. These allow for some very powerful processing of data in a very readable way, utilizing some functional programming concepts to make the process work. We will investigate how can we… Continue Reading java-8-stream-vs-kotlin

Inline Functions in Kotlin 1. Overview In Kotlin, functions are first-class citizens, so we can pass functions around or return them just like other normal types. However, the representation of these functions at runtime sometimes may cause a few limitations or performance complications. In this tutorial, first we’re going to… Continue Reading kotlin-inline-functions