Day: May 3, 2021

Kotlin tutorial for Beginners – Kotlin Basic Input/Output

Kotlin Basic Input/Output In this article, you will learn to display output to the screen, and take input from the user in Kotlin. Koltin Output You can use println() and print() functions to send output to the standard output (screen). Let’s take an example: fun main(args : Array<String>) { println(“Kotlin is interesting.”) } When you run the program, the …

Kotlin tutorial for Beginners – Kotlin Expression, Statements and Blocks

Kotlin Expression, Statements and Blocks In this article, you will learn about Kotlin expressions, Kotlin statements, difference between expression and statement, and Kotlin blocks. Kotlin Expressions Expressions consist of variables, operators etc that evaluates to a single value. Let’s take an example, val score: Int score = 90 + 25 Here, 90 + 25 is an expression that returns Int value. In …

Kotlin tutorial for Beginners – Kotlin Operators

Kotlin Operators Kotlin has a set of operators to perform arithmetic, assignment, comparison operators and more. You will learn to use these operators in this article. Operators are special symbols (characters) that carry out operations on operands (variables and values). For example, + is an operator that performs addition. 1. Arithmetic Operators Here’s a list of arithmetic …