# Method

*noun*

say it: **“METH-ud”** **/ˈmɛθəd/**

A named block of code that does one job; you write it once and call it by name whenever you need that job done.

## What is **Method** in Java?

**Method** — A named block of code that performs an action and can return a value.

## In a sentence

- “I moved the tax math into a **method** called calculateTax so the checkout and the receipt could both use 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

- [Method in C#](https://www.ask-codey.com/glossary/method-c-sharp)
- [Method in JavaScript](https://www.ask-codey.com/glossary/method-javascript)
- [Method in OOP](https://www.ask-codey.com/glossary/method-oop)
- [Method in Python](https://www.ask-codey.com/glossary/method)

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