Kotlin const, var, and val Keywords 1. Introduction In this tutorial, we’ll be outlining the key differences between the const, var, and val keywords in the Kotlin language. To put these keywords into context, we’ll be comparing them to their Java equivalents. 2. Understanding Typing To understand these keywords, we… Continue Reading kotlin-const-var-and-val-keywords

Try-with-resources in Kotlin 1. Introduction Managed languages, such as those targeting the JVM, automatically handle the most common resource: memory. However, we need to deal with all kinds of resources, not just memory: files, network connections, streams, windows, etc. And, just like memory, those need to be released when no… Continue Reading kotlin-try-with-resources

Kotlin return, break, continue Keywords 1. Overview In this tutorial, we’ll discuss the usage of structural jump expressions in Kotlin. Simply put, Kotlin has three structural jump expressions: return, break, continue. In the next sections, we’ll cover their functionalities with and without a label. 2. Labels in Kotlin Any expressions in… Continue Reading kotlin-return-break-continue