V
Vinsoft Lab
Learn • Build • Grow
Mobile Development Intermediate Paid

Kotlin Mobile Development

Learn Kotlin from the fundamentals to object-oriented programming, collections, null safety, functions and Android development foundations.

10 Weeks 24 Lessons Android Development Foundation
Your Progress 0%
LESSON 5

Kotlin Data Types

Understand common Kotlin data types including Int, Double, Boolean, Char and String.

Kotlin Code

Study the example and understand each part.

KOTLIN
fun main() {

    val age: Int = 20
    val price: Double = 1500.50
    val active: Boolean = true
    val grade: Char = 'A'
    val name: String = "Vincent"

    println(age)
    println(price)
    println(active)
    println(grade)
    println(name)

}

Kotlin is commonly developed using Android Studio or IntelliJ IDEA. These examples can be used as a foundation for Android application development.

Key Concept

Kotlin provides strong type checking while also allowing type inference when the type is obvious from the assigned value.

Expected Output / Result

20
1500.5
true
A
Vincent

Finished this lesson?

Mark it complete to update your course progress.

Quick Knowledge Check

Test your Kotlin understanding.

Which keyword creates a read-only variable in Kotlin?

Vinsoft Lab Academy

Learn Kotlin. Build Android applications.

Build a strong Kotlin foundation and continue into practical Android application development.