Understanding Input Handling in Kotlin: readln(), readLine(), and readlnOrNull()
Saturday, February 15, 2025 in Kotlin
Categories:
4 minute read
Input handling is a fundamental aspect of programming, enabling interaction between users and applications. In Kotlin, the standard library provides several functions to read input from the console, including readLine(), readln(), and readlnOrNull(). …
Kotlin from the beginning
Saturday, February 08, 2025 in Kotlin
Categories:
2 minute read
Kotlin is a modern programming language that is easy to learn, especially if you already know Java[1]. Kotlin is used to develop Android apps and server-side apps[1][2]. Here is a plan to learn Kotlin from the beginning: Kotlin Basics Start with …
Variable naming rules in Kotlin
Tuesday, January 23, 2024 in Kotlin
Categories:
2 minute read
As you know, every variable must have a unique name. Although it may seem problem-free at first, as your software expands, your codes may become difficult to understand. Most of the software developers’ time is spent reading the code written by …
Comment Lines in Kotlin Programming
Sunday, January 21, 2024 in Kotlin
Categories:
3 minute read
A computer program consists of various pieces of code coming together and working in harmony. Each block of code does what is expected of it. As time goes on, the program developers who write these codes begin to forget and get confused about which …
Kotlin value assignment and type inference
Saturday, January 20, 2024 in Kotlin
Categories:
4 minute read
In this article, we will explain some of the finer points you need to know about defining variables in the Kotlin programming language. We have prepared this article in addition to the rules we explained in our previous two articles ("Kotlin …
Constants and variables in Kotlin
Wednesday, January 17, 2024 in Kotlin
Categories:
3 minute read
We introduced the topic of defining variables and assigning values in the Kotlin programming language in our previous article. In this article, we will take a closer look at assigning values with const and val. val variables The code below defines …
Kotlin Variable and Value definition
Wednesday, January 17, 2024 in Kotlin
Categories:
4 minute read
What is a variable? A variable is a record location in which a number, text or any other information is kept. Variables are almost the most important building blocks in programming. There are variables in which these values are kept in all the …
Basic Literals in Kotlin
Thursday, January 11, 2024 in Kotlin
Categories:
2 minute read
No matter how complicated, all programming languages perform operations on integers, characters, strings, etc. performed on values. We call these values Literal expressions. It would be very appropriate to explain these types before starting to write …
First Kotlin Program Hello World
Monday, January 01, 2024 in Kotlin
Categories:
2 minute read
When starting to learn programming languages, we always start with the same example. Let’s start our Kotlin programming article with the “Hello World” program without breaking tradition. You can copy the code you see below and paste …
Creating a Class() example in Kotlin
Monday, February 28, 2022 in Kotlin
Categories:
less than a minute
In Object-Oriented Programming Languages, the classes are important. You can find a simple Class creating example in this post. fun main() { var personA = Person("Mike","Sunshine") var personB = Person() var personC = Person(lastName …
Checking data type with when() example
Monday, February 28, 2022 in Kotlin
Categories:
less than a minute
In this short note, you can see an example of when() usage with data type. The type of data will determine the code to run. val x : Any = 12.75 when(x){ is Int -> println("$x is an Integer") is Double -> println("$x is a Double") is String -> …