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

# 13.4.15. Method Result Type

Changing the result type of a method, or replacing a result type with `void`, or replacing `void` with a result type, has the combined effect of deleting the old method and adding a new method with the new result type or newly `void` result (see [§13.4.12](13.4.12.md)).

For purposes of binary compatibility, adding or deleting a method or constructor `m` whose return type involves type variables ([§4.4](4.4.md)) or parameterized types ([§4.5](4.5.md)) is equivalent to the addition (respectively, deletion) of the an otherwise equivalent method whose return type is the erasure ([§4.6](4.6.md)) of the return type of `m`.
