---
spec: JVMS
title: "The Java Virtual Machine Specification"
edition: "Java SE 26 Edition"
java_version: 26
chapter: "Chapter 6. The Java Virtual Machine Instruction Set"
section: "6.5.goto"
heading: "goto"
parent: "6.5. Instructions"
source: https://docs.oracle.com/javase/specs/jvms/se26/html/jvms-6.html#jvms-6.5.goto
id: "6.5.goto"
url: https://jvm.obfuscated.software/jvms/se26/6.5.goto.html
raw: https://jvm.obfuscated.software/jvms/se26/6.5.goto.md
---

# goto

## Operation

Branch always

## Format

```
goto
branchbyte1
branchbyte2
```

## Forms

*goto* = 167 (0xa7)

## Operand Stack

No change

## Description

The unsigned bytes *branchbyte1* and *branchbyte2* are used to construct a signed 16-bit *branchoffset*, where *branchoffset* is (*branchbyte1* `<<` 8) | *branchbyte2*. Execution proceeds at that offset from the address of the opcode of this *goto* instruction. The target address must be that of an opcode of an instruction within the method that contains this *goto* instruction.
