Conclusion
Every variable in Kotlin has a type that determines what it can hold, and you can declare the type of a variable. Relying on Kotlin’s type inference is the best-practice way to keep your code clean and concise.
Strings are a fundamental data type in Kotlin. Manipulating them and using them with other variables is a crucial skill. This lesson has further prepared you for writing software programs in Kotlin.
In this lesson, you learned:
- The difference between declared and inferred types.
- How to define the type of a variable.
- How to perform String interpolation.
In the next lesson, you’ll learn how to work with different data types using operators.