# Introduction to Functions: an overview

When you keep repeating the same lines of code, you can turn them into a function, one reusable block you call by name.

Novice · Java · Updated November 16, 2026

By Gregor Dzierzon

A function is a block of reusable code.

As you develop software, you will find that you often write the same lines of code or possibly copy and paste a lot of your code. This is an opportunity for you to look for a repeatable pattern, and instead of copying and pasting that pattern repeatedly, you can convert that code into a function.

## Cheat sheets

- [Introduction to Functions](https://www.ask-codey.com/cheat-sheets/introduction-to-functions-an-overview-cheat-sheet)

Source: https://www.ask-codey.com/lessons/introduction-to-functions-an-overview
