142k views
0 votes
The declarations and statements that compose the method definition are called the __________.

a.method body

b.method header

c.parameter list

d.method name

User J Ashley
by
8.3k points

1 Answer

5 votes

Answer:

a. method body.

Step-by-step explanation:

A method contains the following components:

  • method name
  • method arguments
  • method return type
  • method implementation code

All of these together constitute the method body. The method body contains the declarations and statements constituting the method definition.

Apart from this, when the method is invoked at runtime, it needs to be called with method-name and the actual parameter list which gets substituted for the formal parameters in the method body.

User Jlordo
by
8.8k points