# Data Type

*noun*

say it: **“DAT-uh type”** **/ˈdætə taɪp/** or **“DAY-tuh type”** **/ˈdeɪtə taɪp/**

The kind of value something holds, such as a whole number, a decimal number, true or false, or text, which decides what you can do with it.

## What is **Data Type** in Java?

**Data Type** — A rule describing what kind of value something can hold and what operations it supports.

```java
class Order {
    int itemCount = 3;
    double price = 4.50;
    char size = 'M';
    boolean paid = true;
}
```

## In a sentence

- “The compiler complained because the **data type** of age was int, and I tried to put "twenty" in it.”

Level: Novice · [More Java terms at this level](https://www.ask-codey.com/glossary?category=java&level=1)

Updated: October 26, 2026

## In other subjects

- [Data Type in C#](https://www.ask-codey.com/glossary/data-type-c-sharp)
- [Data Type in Database](https://www.ask-codey.com/glossary/data-type-database)
- [Data Type in Python](https://www.ask-codey.com/glossary/data-type)

Source: https://www.ask-codey.com/glossary/data-type-java
