# Data Type

A rule describing what kind of value something can hold and what operations it supports.

## 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;
}
```

Level: Novice · [More Java terms at this level](https://www.ask-codey.com/glossary/subjects/java/novice)

Updated: September 27, 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)

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