DEV Community

Cover image for Data Types in Kotlin
Jay Tillu
Jay Tillu

Posted on • Edited on

2 2

Data Types in Kotlin

  • Data type means a type of data that can be used and manipulate in the programming language.

  • Kotlin is a statically typed language like Java. That means the type of variable is known during the compile time.

  • Just remember that in kotlin everything is an object in the sense that we can call member functions and properties on any variable.

For example, consider the following:

highScore.toInt()
a + b — a.plus(b)
Enter fullscreen mode Exit fullscreen mode
  • Here highScore is a variable on which we are calling toInt() conversion function. And a and b are also variables on which a.plus(b) internally calls. So that is how they called everything is an object.

There are basically three types of data type in kotlin:

  1. Number
  2. Character
  3. Boolean
  • Data types are one of the foundational topics of any programming language. That’s why I’ll post three posts on each data types. So that they all cannot be mixed up with each other and will become easy to understand for you guys. Please check out for them as well. These posts also come up with the same wallpaper, so that it becomes easy for you to find them.

Till then Keep Coding, Keep Loving.

Follow me for more such content

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay