Built-in data types
Solidity is a statically-typed language. Developers with other programming language backgrounds, such as JavaScript, Java, or Python, will easily learn the Solidity syntax. Each variable needs to specify the data type. Depending on the data type, a declared variable will have a default value, which is an initial default value whose byte representation is all zeros.
Data types in Solidity can be either of the following:
- Value types: This will always be passed by value
- Reference types: This means it will be passed by reference
Solidity defines a large number of built-in data types, which allow you to define the complex types using enums, structs, and mapping.
The basic data types in Solidity are as follows:
Types |
Operators |
Example |
Note |
Boolean ( |
|