Kotlin: Functions
Functions in Kotlin are declared using the fun keyword fun main(args: Array<string>) { // code here } How to add parameters in function declaration: Function parameters …
A blog for all types of codes, and languages examples and algorithms.
Functions in Kotlin are declared using the fun keyword fun main(args: Array<string>) { // code here } How to add parameters in function declaration: Function parameters …
Before jump into Kotlin data class, Lets us see POJO class in Java. If we want to store some data in Java, we would usually …
The string is an array of characters Strings are represented by the type String Strings are immutable. That means we can not alter a String …
Overview: Unlike Java, Kotlin does not have static members or member functions. If you want to access the members or member functions without instantiating class, use the …
Introduction: The Fizz Buzz program is a classic coding exercise often used in technical interviews to assess a candidate’s basic programming skills. In Kotlin, mastering …
Introduction: Anagrams are fascinating linguistic puzzles where two or more words or phrases can be rearranged to form different words or phrases containing the same …
Jetpack DataStore is a data storage solution that allows you to store key-value pairs or typed objects with protocol buffers. DataStore uses Kotlin coroutines and Flow …
ListAdapter was added in Recyclerview library version 27.1.0. It is RecyclerView.Adapter base class for presenting List data in a RecyclerView, including computing diffs between Lists on a background thread. Before …
Introduction In modern Android app development, handling JSON data is a common task, especially when interacting with web APIs. JSON (JavaScript Object Notation) is …