Learn how to create a simple calculator in Kotlin in two different ways. We will learn to write a calculator program using if-else statements and using when expressions.
ReadLearn how to remove specific elements from an array by using its index in Kotlin. We have to convert the array to a MutableList first and then convert it back to an array.
ReadLearn how to find the average of numbers of an array in Kotlin in two different ways. We can either iterate over the elements of the array or we can use the average function to find the average of numbers of an array.
ReadLearn how to swap two numbers in Kotlin in different ways. We will learn how to swap the numbers by using a third variable, without using a third variable, using also, with and apply scope functions.
ReadLearn how to print an integer entered by the user in Kotlin. We will learn 4 ways to do that, by using the Scanner class, by using the readLine method, with readln method and by using readlnOrNull method.
ReadLearn how to print Hello World in Kotlin. We will learn how to create a project, how to create Kotlin files and how to run a program that print Hello World in Kotlin.
ReadLearn how to check if a year is a leap year or not in Kotlin in two different ways. We will learn how to check for leap year by using a if-else block and by using when block in Kotlin.
Read4 different Kotlin programs to add two numbers. We will learn examples with predefined values, with user inputs, with floating point numbers and how to add N numbers.
ReadKotlin program to convert a stack trace to string. Printing stack trace as string has many advantages.
ReadKotlin program to convert a list to array. This post will show you different ways to do that.
Read