Kotlin

Kotlin for Loop

The for loop in Kotlin iterates through anything that provides an iterator. In this article, you learn to create for loop (with the help of examples). Syntax The syntax of for loop in Kotlin is: for (item in collection) { // body of loop } In Kotlin, for loop is used to iterate through the following because all […]

Kotlin for Loop Read More »

Kotlin do-while Loop

In this article, you will learn about the do-while loop and how to create do-while loop in Kotlin programming. Loops in Kotlin are used when we want to execute a block of statements repeatedly until a specific condition is met(condition is false). Kotlin do-while Loop Kotlin’s do-while loop is an exit-control loop, which means unlike while loop, the do-while

Kotlin do-while Loop Read More »

Kotlin while Loop

In this article, you will learn about while loop and how to create while loop in Kotlin programming. Loops in Kotlin are used when we want to execute a block of statements repeatedly until a specific condition is met(condition is false). Kotlin While Loop The while loop executes the block of code as long as a specified

Kotlin while Loop Read More »

Kotlin when Expression

In this article, you will learn about when expression in Kotlin with the help of various examples. In Kotlin, when replaces the switch operator of other languages like Java, C, C++, etc. when matches its argument against all branches sequentially until some branch condition is satisfied. After the first match found, it reaches to end of the

Kotlin when Expression Read More »

Kotlin if Expression

In this article, you will learn to use if expression in Kotlin with the help of examples. There are different types of if expression in Kotlin: if-else expression if-else-if ladder expression nested if expression Traditional if Statement if statement The if statement checks the given condition. If the condition evaluates to be true then the

Kotlin if Expression Read More »

Kotlin Hello World Program

In this article, We will learn how to start with Kotlin Programming and will write a small print “Hello World” program. Steps: IDE (Java Editor) Installation Writing Hello World Kotlin program. Kotlin Editor To write your Kotlin programs, you will need a text editor. There are different IDEs (Integrated Development Environment) available in the market

Kotlin Hello World Program Read More »

Google Places API Example with AutocompleteTextView(Kotlin/Java)

Here is the simple example of Google Places SDK for Android returns place predictions in response to user search queries.As the user types, the autocomplete service returns suggestions for places such as businesses, addresses, latitude, longitude etc. Get the full code from Github     You can add autocompleteTextView  to your app in the following

Google Places API Example with AutocompleteTextView(Kotlin/Java) Read More »

RecyclerView Example In Kotlin

What is RecyclerView? The RecyclerView widget is a more advanced and flexible version of ListView. This widget is a container for displaying large data sets that can be scrolled very efficiently by maintaining a limited number of views. Here I would demonstrate you a working example of RecyclerView, with some basic functionality. The RecyclerView we

RecyclerView Example In Kotlin Read More »