Example 1: Kotlin Program to Add Two Dates Kotlin Program to Add Two Dates .we’ll learn about...
Category - Kotlin
Kotlin Continue Statement Example
As like every programming language in Kotlin continue expression skips the current iteration of the...
Kotlin Break Statement Example
As like java break statement is used to break the iteration from the looping statements. Kotlin...
Kotlin For Loop Example
For loop in Kotlin is slightly different from java. In Kotlin, for loop is used to iterate through...
Kotlin Do While Loop Example
do..while loop in Kotlin guarantees at least one execution of block of statements because loop...
Kotlin While Loop Example
As like In Java, Kotlin while loop continually executes a block of statements while a particular...
Kotlin When Statement Example
Kotlin when statement is same as Java’s Switch statement. When statement in Kotlin allows a...
Kotlin Nested If Example
A nested if statement is an if-else statement with another if statement as the if body or the else...
Kotlin If Else If Statement Example
Kotlin Code: fun main(args: Array<String>) { var number = 2 val result = if (number > 0)...
Kotlin If Statement Example
Code: fun main(args: Array<String>) { /*Traditional if else statement in Programming. if...
Kotlin Print And Println
Kotlin Code: fun main(args : Array<String>) { /* Showing the difference between print and...
Kotlin Type Conversion
fun main(args : Array<String>) { /* In java we can assign value like this but in kotlin it...
Kotlin Logical Operator Examples
Kotlin Code: fun main(args: Array<String>) { val a = 30 val b = 10 val c = -4 val Andresult :...