Learn how to use default parameters in kotlin constructor and how to initialize a class by using default parameters.
ReadLearn how to use number in Kotlin with different methods defined in it. We will see its built-in types, different types of use cases with examples.
ReadUsing try catch finally, we can handle an exception. Rethrowing an exception is used to rethrow an exception again in the catch block. In this post, we will learn how to rethrow exception in kotlin with example.
ReadLearn how to handle exceptions in Kotlin using try catch with different examples. We will explore how to throw an exception and how to use try catch blocks to handle.
ReadgroupingBy method is used to group items of a collection using a keySelector function. It returns one Grouping object. For example, we can group a list of strings by the first character of each string. aggregate is another function that can be used with a Grouping to apply one operation on each element of each group sequentially. In this post, I will show you how to use groupingBy with one example.
ReadJvmStatic annotation or @JvmStatic is an important annotation of Kotlin. In this post, I will show you where JvmStatic is used and its use cases.
ReadgroupingBy function is used to group items and apply one operation using a keySelector function. It returns one Grouping object that we can use to call its other methods. In this post, I will quickly show you how to use groupingBy with examples.
ReadgroupByTo method is used to group elements of an array by a key returned by a key selector function. It is similar to groupBy. The only difference is that we can put the result in a mutable map.
ReadgroupBy method of Kotlin is used to group similar items of a collection. It is useful in many cases like we can group items based on type, length, object category, etc. It takes one selector function and based on that function it groups the items.
ReadIn this post, I will show you different ways to convert one string to long in Kotlin. Kotlin provides different methods that make it easy to achieve.
Read