> For the complete documentation index, see [llms.txt](https://muhammad-tri-wibowo.gitbook.io/java-tutorials/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://muhammad-tri-wibowo.gitbook.io/java-tutorials/basic-java/data-type.md).

# Data Type

* **Primitive Data Types:**
  * **int:** Used for integers (e.g., 1, 100, -500).
  * **double:** Used for floating-point numbers (e.g., 3.14, -0.5, 2.0).
  * **char:** Used for single characters (e.g., 'A', 'b', '$').
  * **boolean:** Used for true or false values.
  * **long:** Used for large integers.
  * **float:** Used for floating-point numbers with smaller precision than double.
  * **short:** Used for small integers.
  * **byte:** Used for very small integers.
* **Reference Data Types:**
  * **Objects:** Variables can also reference objects of various classes in Java.
  * **Arrays:** Variables can hold arrays of any data type.
