Data Types

Rust is a statically typed language, meaning, it must know the type of all variables at compile time.

Variable Definition

Implicit Definition

Unlike other languages like C++ and Java, Rust can infer the type from the type of value assigned to a variable.

let variablename = value

Explicit Definition

let variablename:datatype = value