Exercises for the chapter “Data types in Kotlin”

Task #1 Answer the following questions: Does Kotlin have dynamic or static typing? Kotlin is a statically typed language. What does static typing mean and what advantages does it offer? Static typing means that each variable is assigned a specific data type at compile time and cannot be changed at runtime. What two parameters are determined by data type in Kotlin? The data type determines

Read more

Exercises for the chapter “Variables in Kotlin”

Task #1 Declare an immutable variable named age with type int. Assign the value 35 to the variable. Enter the value of the variable in the console using the function println() out of. Solution to exercise # 1 fun main() { val age: Int age = 35 println(age) } Task #2 Declare an immutable variable named age of type int. Assign the value 35 to the variable.

Read more