Written by the Fiveable Content Team โข Last updated September 2025
Verified for the 2026 exam
Verified for the 2026 examโขWritten by the Fiveable Content Team โข Last updated September 2025
Definition
The method signature `add(int x, int y)` defines a method named `add`, which accepts two integer parameters `x` and `y`. The method adds the values of `x` and `y` together and returns an integer result.
Related terms
subtract(int x, int y): A method that accepts two integers, subtracts the value of the second integer from the first integer, and returns an integer result.