> For the complete documentation index, see [llms.txt](https://chihaolu.gitbook.io/all-in-one-solidity/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chihaolu.gitbook.io/all-in-one-solidity/part-i-basic/chapter-2-xing-bie-types-bian-shu-variables.md).

# | Chapter 2 | 型別 Types & 變數 Variables

Solidity 有別於 python, Javascript 這樣的弱型別語言，它是一個更像是 C/C++, Java 的強型別語言。

在Solidity 中所有變數都會被預設地初始化：

* 所以型態裡面不存在`null`或`undefined`
* `(u)int = 0`
* `bool = false`
* `string = ""`

其中所有可視性為 `public`的變數都會自動生成一個相同名稱的 Getter Function，我們在Remix IDE可以看見它的存在。

參考型別（reference types）的變數需要標明記憶體配置（memory location: `memory`或`storage`）
