---
spec: JLS
title: "The Java Language Specification"
edition: "Java SE 24 Edition"
java_version: 24
chapter: "Chapter 14. Blocks, Statements, and Patterns"
section: "14.2"
heading: "14.2. Blocks"
parent: "Chapter 14. Blocks, Statements, and Patterns"
source: https://docs.oracle.com/javase/specs/jls/se24/html/jls-14.html#jls-14.2
id: "14.2"
url: https://jvm.obfuscated.software/jls/se24/14.2.html
raw: https://jvm.obfuscated.software/jls/se24/14.2.md
---

# 14.2. Blocks

A *block* is a sequence of statements, local variable declaration statements, and local class and interface declarations within braces.

```
Block:
  { [BlockStatements] }

BlockStatements:
  BlockStatement {BlockStatement}

BlockStatement:
  LocalClassOrInterfaceDeclaration
  LocalVariableDeclarationStatement
  Statement
```

A block is executed by executing each of the local variable declaration statements and other statements in order from first to last (left to right). If all of these block statements complete normally, then the block completes normally. If any of these block statements complete abruptly for any reason, then the block completes abruptly for the same reason.
