8 posts tagged with “kotlin

Extending objects in Kotlin

February 14, 2019

In the old days, in order to add new functionality to a class you would need to create a Utility class or even subclass the object. In…

Data classes with Default Constructors in Kotlin

February 12, 2019

While doing Java you will notice that there are a lot of classes that are just holding data, they don't have any methods other than and…

What does ?: do in Kotlin?

February 10, 2019

One of the weird symbols that you may see in Kotlin code is , which is known as the elvis operator . What does it do though? Basically…

Understanding how to use with in Kotlin

February 04, 2019

Kotlin has many useful tricks that makes developers lives a lot easier. For example, using is super useful for changing multiple…

Easy Peasy Merge Sort in Kotlin

January 23, 2019

Merge Sort is an efficient, comparison oriented, general-use sorting algorithm. In many different interview scenarios, you will be asked to…

Leveraging Null Safety in Kotlin

January 17, 2019

One of the biggest annoyance in Java is always having to deal with . Looking at any large Java code base, you are bound to see the the…

Simplify assigning properties with Apply in Kotlin

January 15, 2019

Kotlin has this nice apply function that is an extension that allows you to set multiple properties at one time. It returns itself after…

Understanding Ranges in Kotlin

January 14, 2019

Often times we need to create a loop, however in many different languages to define a range varies. In Kotlin, there are few ways we can…

Browse all tags