Conclusion
In this lesson, you’ve looked at the different types the Kotlin programming languages offers. You learned:
- How to store numeric values using Int, Long, Float, and Double types.
- About the Boolean type and how it helps you store true or false.
- How to use Char to store a single character.
- How to work with String type to store a sequence of characters.
- How to use arrays to store multiple values of the same type.
- How Kotlin creates a distinction between nullable and non-nullable types to avoid errors.
- How to rely on type inference to make your code more concise and let the compiler infer the type of your variable based on the value assigned.