# 1.2 Variables and Data Types

#### Topic 1.2 — Variables and Data Types

**Suggested Skills:** 1.A, 2.A

**LO 1.2.A** — Identify the most appropriate data type category for a particular specification.

* **1.2.A.1** — A **data type** is a set of values and a corresponding set of operations on those values. Data types can be categorized as either primitive or reference.
* **1.2.A.2** — The primitive data types used in this course define the set of values and corresponding operations on those values for numbers and Boolean values.
* **1.2.A.3** — A **reference type** is used to define objects that are not primitive types.

**LO 1.2.B** — Develop code to declare variables to store numbers and Boolean values.

* **1.2.B.1** — The three primitive data types used in this course are `int`, `double`, and `boolean`. An `int` value is an integer. A `double` value is a real number. A `boolean` value is either `true` or `false`.
  * ❌ **EXCLUSION** — The other five primitive data types (`long`, `short`, `byte`, `float`, and `char`) are outside the scope of this course and exam.
* **1.2.B.2** — A **variable** is a storage location that holds a value, which can change while the program is running. Every variable has a name and an associated data type. A variable of a primitive type holds a primitive value from that type.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.computersciencea.com/unit-1-using-objects-and-methods/1.2-variables-and-data-types.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
