# void

A return type showing that a method returns no value.

## What is **void** in Java?

**void** — A return type showing that a method returns no value.

```java
class OrderCalculator {
    int total(int price, int quantity) {
        return price * quantity;
    }
}
```

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

Updated: September 27, 2026

## In other subjects

- [void in C#](https://www.ask-codey.com/glossary/void-c-sharp)

Source: https://www.ask-codey.com/glossary/void
