kotlin

kotlin

Kotlin program to print a multiplication table

Kotlin program to print a multiplication table. The program will take a number as input from the user and print a multiplication table for the number.

Read
kotlin

Different ways to write to a file in Kotlin

Kotlin program to write to a file in different ways. Kotlin standard library provides a couple of methods to write content to a file. In this post we will learn different ways to do that.

Read
kotlin

6 ways to add items to a list in Kotlin with examples

How to add items to a list in kotlin. This post will show how to add single or multiple items to a kotlin list in 6 different ways.

Read
kotlin

Binary search implementation in Kotlin for a list of custom objects

Kotlin binary search implementation for a list of custom objects. Kotlin collection class provides a binary search method that can be used to search in a list.

Read
kotlin

How to sort a kotlin map by value

Learn how to sort a map by value in Kotlin. A map in Kotlin is used to hold key-value pairs and using a key we can access the value of that map. We can also sort a Kotlin map by its values.

Read
kotlin

5 different ways in Kotlin to find a string in a list of strings

Kotlin program to find a string in a list of strings. We will learn five different ways to solve this problem. Using a for loop, using find, first, indexOf, indexOfFirst, contains and filter.

Read
kotlin

5 different Kotlin program to iterate through a mutablelist

Learn how to iterate through a mutablelist in kotlin. We will learn five different ways to iterate a mutablelist in this blog post.

Read
kotlin

Three different ways to create an empty string array in Kotlin

Three different ways to create one empty string array in Kotlin. We will use arrayOf, string constructor and arrayOfNull for that.

Read
kotlin

Extension function in Kotlin explanation with examples

This post will give you an introduction to kotlin extension function and how to use it with examples. Extension functions are used to add more functionality to a kotlin class easily.

Read
kotlin

repeat in Kotlin explanation with example

repeat is used to repeat any one function for a specific amount of time in Kotlin. This post will show you how to use repeat with example.

Read