---
spec: JLS
title: "The Java Language Specification"
edition: "Java SE 21 Edition"
java_version: 21
chapter: "Chapter 13. Binary Compatibility"
section: "13.4.22"
heading: "13.4.22. Method and Constructor Body"
parent: "13.4. Evolution of Classes"
source: https://docs.oracle.com/javase/specs/jls/se21/html/jls-13.html#jls-13.4.22
id: "13.4.22"
url: https://jvm.obfuscated.software/jls/se21/13.4.22.html
raw: https://jvm.obfuscated.software/jls/se21/13.4.22.md
---

# 13.4.22. Method and Constructor Body

Changes to the body of a method or constructor do not break compatibility with pre-existing binaries.

The keyword `final` on a method does not mean that the method can be safely inlined; it means only that the method cannot be overridden. It is still possible that a new version of that method will be provided at link-time. Furthermore, the structure of the original program must be preserved for purposes of reflection.

Therefore, we note that a Java compiler cannot expand a method inline at compile time. In general we suggest that implementations use late-bound (run-time) code generation and optimization.
