admin

admin

Getting User Input into a Kotlin Program

To read a user input from a Kotlin program, use the readLine() function. The readLine() function allows the program’s user to enter a string values or intercept keyboard input from the console. When you run the program, the output will…

Kotlin: Data Type Conversions

From time to time, you might need to convert (i.e. casting) a variable from one data type to another. Example such as converting a string to a number. Kotlin contains predefined functions that allows you to do the data type…

Kotlin Data Types

The basic data types used in Kotlin are strings, characters, booleans, numbers and arrays. String Use double-quotes to define a string. Used to store words or sentences. Character Use single-quote to define a character. Used to store a single character.…