Kotlin

Below you will find pages that utilize the term “Kotlin”
April 24, 2023
Destructuring Declarations in Kotlin

Sometimes it’s easy to destructure an object into multiple variables of different properties instead of calling it again and again using . operator on the property or instance itself. It is beneficial for a few reasons like,

April 22, 2023
Nested Class vs Inner Class : Kotlin

Nested and Inner classes are two important concepts in Kotlin that allow developers to organize and structure their code in a more effective way. In this blog, we’ll explore these concepts and understand how they can be used in Kotlin.

June 13, 2022
Kotlin Count Function

The collection is something which is used by almost everyone. It makes our life easy. List, Set and Map are the best examples of them.

May 18, 2022
Plus(+) and Minus(-) Operator : Kotlin

The collection is something which is used by almost everyone. It makes our life easy. List, Set and Map are the best examples of them.

May 1, 2022
Filter Operator : Kotlin

The collection is something which is used by almost everyone. It makes our life easy. List, Set and Map are the best examples of them.

April 23, 2022
Map Operator : Kotlin

The collection is something which is used by almost everyone. It makes our life easy. List, Set and Map are the best examples of them.

April 11, 2022
Math.round vs Math.floor vs Math.ceil : Kotlin

Rounding up to the nearest Integer value functionality is something required a lot of times. Kotlin has a few inbuilt functions which can do the rounding up for us but they are a bit confusing. To decide when to use what, we need to understand which rounding function rounds up in which direction and which data types it can round up.

January 15, 2022
Kotlin Range Operator

Range Operator in Kotlin is a basic operator that is used to operate over a range. A range can be defined with a start value and an end value with and without inclusion.

December 20, 2021
Iterators in Kotlin

Collections (Sets, Maps and Lists) are something we use daily. Traversing (Iteration) is the most common operation we perform over any collection.

August 29, 2021
lateinit vs lazy Property in Kotlin

Since object creation is a heavy process as it initialises all the public and private properties defined in that class when the constructor is called, Kotlin has few ways to initialise properties later when required. We already discussed lateinit properties and lazy properties.

August 4, 2021
lazy Property in Kotlin

Object creation is a heavy process. When we create a class object, all the public and private properties of that class are initialised inside the constructor. Every variable inside a class initialisation requires a certain amount of time to allocate the memory on the heap and hold its reference on the stack. The more variables, the more time it may take but since the time is in microseconds or even less, it’s not observable.

May 10, 2021
Why with function is not an Extension to Template class?

After reading my last blog about Kotlin with function, a lot of developers have asked me about, why with is not an extension to Template class like other scope functions?

May 9, 2021
Kotlin run function

Kotlin has made our life very easy by providing features like extension functions, nullability check and much more. One such kind of really helpful feature is Scope functions. Once you understand what scope functions are, you will not able to resist yourself from using them.

May 4, 2021
Kotlin with function

Kotlin has made our life very easy by providing features like extension functions, nullability check and much more. One such kind of really helpful feature is Scope functions. Once you understand what scope functions are, you will not able to resist yourself from using them.

April 29, 2021
Kotlin also function

In continuation to my previous post where I explained about Kotlin let function and Kotlin apply function, let’s try to understand today about also function today.

April 20, 2021
any(), none() & all() : Kotlin

Kotlin is a powerful language that reduces a lot of boilerplate code required to perform basic operations in comparison to Java. The classic examples for the same are any, non and all functions which were added to the Iterable interface and Map interface.

April 13, 2021
Kotlin : Single Expression Function

Kotlin is a powerful language that reduced a lot of boilerplate code when compared to Java. The single expression function is the same in terms of reducing the boilerplate code.

March 6, 2021
Reified : Kotlin

Before we learn about reified,

Generics in any language is the powerful features that allow us to define classes, methods and properties which are accessible using different data types while keeping a check of the compile-time type safety.

December 16, 2020
Kotlin Enum Classes

Enums are special classes which limit the possible values of an object for that class. The possible values defined for that class are final or unchangeable.

October 26, 2020
How extension functions resolved?

“how are extension functions resolved?”

This question is being asked by almost everyone both in and outside the interviews. 

Even I have asked this question to many candidates during the interview. 

Prev 1 2 3