In this tutorial, I will show you how to convert one character to integer in Kotlin. Kotlin provides a lot of utility functions for each class.
ReadString is immutable in Kotlin. If we want to change any character in a string, we can't directly change it. For that, we need to create one new string modifying the given string. In this tutorial, we will learn different ways to do that in Kotlin.
ReadIn this tutorial, we will learn how to convert one negative number to positive in Kotlin. We will learn two different ways to do that.
ReadPartitioning or dividing a list or any other collection is easy in Kotlin. Kotlin provides one inbuilt method that makes it easier for us. In this post, I will show you how to do partition using and without using the provided function.
ReadIn this tutorial, we will learn how to remove all negative numbers from a mutable list. For example, if the list is 1,2,3,4,5,-6,-7,-8,9, it will remove all negative numbers and convert it to 1,2,3,4,5,9.
ReadFor normal classes, if we want to access any of its property, like calling a method or accessing any variable in the class, we need to create one object for that class. If we don't want to create one class instance and access its members, we need to create one companion object. Unlike other programming languages like Java or Python, Kotlin doesn't have the concept of static function.
ReadIn this post, I will show you how to check if a string is numeric or not in Kotlin. For example, "1.2" is a numeric string but 1.2x is not. We will learn different ways to solve this problem.
ReadKotlin doesn't provide any string method to remove all whitespaces from a string. The only way to do it by replacing all blank spaces with an empty string.
ReadInheritance is a commonly used concept in object-oriented programming. It is the way to inherit functions and properties from a base class to a child class.
ReadIn this tutorial, I will show you how to filter one list using another list. For example, if the first list contains 1,2,3,4,5 and if the second list contains 2,4,6,7 and if we filter the first list based on the second list, it will give 2,4.
Read