Method body

Method body

Method body — contains the code that defines what the method does.

public static int multiply(int a, int b) {
    int result = a * b; // Method body
    return result;
}

It includes statements that perform the intended task, using the method's parameters and any local variables.

Related concepts

Method body

Method body — Structure map

Clickable & Draggable!

Method body — Related pages: